001package org.hl7.fhir.dstu3.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 Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.1
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;
045import org.hl7.fhir.exceptions.FHIRFormatError;
046/**
047 * A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.
048 */
049@ResourceDef(name="PractitionerRole", profile="http://hl7.org/fhir/StructureDefinition/PractitionerRole")
050public class PractitionerRole extends DomainResource {
051
052    public enum DaysOfWeek {
053        /**
054         * Monday
055         */
056        MON, 
057        /**
058         * Tuesday
059         */
060        TUE, 
061        /**
062         * Wednesday
063         */
064        WED, 
065        /**
066         * Thursday
067         */
068        THU, 
069        /**
070         * Friday
071         */
072        FRI, 
073        /**
074         * Saturday
075         */
076        SAT, 
077        /**
078         * Sunday
079         */
080        SUN, 
081        /**
082         * added to help the parsers with the generic types
083         */
084        NULL;
085        public static DaysOfWeek fromCode(String codeString) throws FHIRException {
086            if (codeString == null || "".equals(codeString))
087                return null;
088        if ("mon".equals(codeString))
089          return MON;
090        if ("tue".equals(codeString))
091          return TUE;
092        if ("wed".equals(codeString))
093          return WED;
094        if ("thu".equals(codeString))
095          return THU;
096        if ("fri".equals(codeString))
097          return FRI;
098        if ("sat".equals(codeString))
099          return SAT;
100        if ("sun".equals(codeString))
101          return SUN;
102        if (Configuration.isAcceptInvalidEnums())
103          return null;
104        else
105          throw new FHIRException("Unknown DaysOfWeek code '"+codeString+"'");
106        }
107        public String toCode() {
108          switch (this) {
109            case MON: return "mon";
110            case TUE: return "tue";
111            case WED: return "wed";
112            case THU: return "thu";
113            case FRI: return "fri";
114            case SAT: return "sat";
115            case SUN: return "sun";
116            default: return "?";
117          }
118        }
119        public String getSystem() {
120          switch (this) {
121            case MON: return "http://hl7.org/fhir/days-of-week";
122            case TUE: return "http://hl7.org/fhir/days-of-week";
123            case WED: return "http://hl7.org/fhir/days-of-week";
124            case THU: return "http://hl7.org/fhir/days-of-week";
125            case FRI: return "http://hl7.org/fhir/days-of-week";
126            case SAT: return "http://hl7.org/fhir/days-of-week";
127            case SUN: return "http://hl7.org/fhir/days-of-week";
128            default: return "?";
129          }
130        }
131        public String getDefinition() {
132          switch (this) {
133            case MON: return "Monday";
134            case TUE: return "Tuesday";
135            case WED: return "Wednesday";
136            case THU: return "Thursday";
137            case FRI: return "Friday";
138            case SAT: return "Saturday";
139            case SUN: return "Sunday";
140            default: return "?";
141          }
142        }
143        public String getDisplay() {
144          switch (this) {
145            case MON: return "Monday";
146            case TUE: return "Tuesday";
147            case WED: return "Wednesday";
148            case THU: return "Thursday";
149            case FRI: return "Friday";
150            case SAT: return "Saturday";
151            case SUN: return "Sunday";
152            default: return "?";
153          }
154        }
155    }
156
157  public static class DaysOfWeekEnumFactory implements EnumFactory<DaysOfWeek> {
158    public DaysOfWeek fromCode(String codeString) throws IllegalArgumentException {
159      if (codeString == null || "".equals(codeString))
160            if (codeString == null || "".equals(codeString))
161                return null;
162        if ("mon".equals(codeString))
163          return DaysOfWeek.MON;
164        if ("tue".equals(codeString))
165          return DaysOfWeek.TUE;
166        if ("wed".equals(codeString))
167          return DaysOfWeek.WED;
168        if ("thu".equals(codeString))
169          return DaysOfWeek.THU;
170        if ("fri".equals(codeString))
171          return DaysOfWeek.FRI;
172        if ("sat".equals(codeString))
173          return DaysOfWeek.SAT;
174        if ("sun".equals(codeString))
175          return DaysOfWeek.SUN;
176        throw new IllegalArgumentException("Unknown DaysOfWeek code '"+codeString+"'");
177        }
178        public Enumeration<DaysOfWeek> fromType(Base code) throws FHIRException {
179          if (code == null)
180            return null;
181          if (code.isEmpty())
182            return new Enumeration<DaysOfWeek>(this);
183          String codeString = ((PrimitiveType) code).asStringValue();
184          if (codeString == null || "".equals(codeString))
185            return null;
186        if ("mon".equals(codeString))
187          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.MON);
188        if ("tue".equals(codeString))
189          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.TUE);
190        if ("wed".equals(codeString))
191          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.WED);
192        if ("thu".equals(codeString))
193          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.THU);
194        if ("fri".equals(codeString))
195          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.FRI);
196        if ("sat".equals(codeString))
197          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.SAT);
198        if ("sun".equals(codeString))
199          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.SUN);
200        throw new FHIRException("Unknown DaysOfWeek code '"+codeString+"'");
201        }
202    public String toCode(DaysOfWeek code) {
203      if (code == DaysOfWeek.MON)
204        return "mon";
205      if (code == DaysOfWeek.TUE)
206        return "tue";
207      if (code == DaysOfWeek.WED)
208        return "wed";
209      if (code == DaysOfWeek.THU)
210        return "thu";
211      if (code == DaysOfWeek.FRI)
212        return "fri";
213      if (code == DaysOfWeek.SAT)
214        return "sat";
215      if (code == DaysOfWeek.SUN)
216        return "sun";
217      return "?";
218      }
219    public String toSystem(DaysOfWeek code) {
220      return code.getSystem();
221      }
222    }
223
224    @Block()
225    public static class PractitionerRoleAvailableTimeComponent extends BackboneElement implements IBaseBackboneElement {
226        /**
227         * Indicates which days of the week are available between the start and end Times.
228         */
229        @Child(name = "daysOfWeek", type = {CodeType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
230        @Description(shortDefinition="mon | tue | wed | thu | fri | sat | sun", formalDefinition="Indicates which days of the week are available between the start and end Times." )
231        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/days-of-week")
232        protected List<Enumeration<DaysOfWeek>> daysOfWeek;
233
234        /**
235         * Is this always available? (hence times are irrelevant) e.g. 24 hour service.
236         */
237        @Child(name = "allDay", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false)
238        @Description(shortDefinition="Always available? e.g. 24 hour service", formalDefinition="Is this always available? (hence times are irrelevant) e.g. 24 hour service." )
239        protected BooleanType allDay;
240
241        /**
242         * The opening time of day. Note: If the AllDay flag is set, then this time is ignored.
243         */
244        @Child(name = "availableStartTime", type = {TimeType.class}, order=3, min=0, max=1, modifier=false, summary=false)
245        @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." )
246        protected TimeType availableStartTime;
247
248        /**
249         * The closing time of day. Note: If the AllDay flag is set, then this time is ignored.
250         */
251        @Child(name = "availableEndTime", type = {TimeType.class}, order=4, min=0, max=1, modifier=false, summary=false)
252        @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." )
253        protected TimeType availableEndTime;
254
255        private static final long serialVersionUID = -2139510127L;
256
257    /**
258     * Constructor
259     */
260      public PractitionerRoleAvailableTimeComponent() {
261        super();
262      }
263
264        /**
265         * @return {@link #daysOfWeek} (Indicates which days of the week are available between the start and end Times.)
266         */
267        public List<Enumeration<DaysOfWeek>> getDaysOfWeek() { 
268          if (this.daysOfWeek == null)
269            this.daysOfWeek = new ArrayList<Enumeration<DaysOfWeek>>();
270          return this.daysOfWeek;
271        }
272
273        /**
274         * @return Returns a reference to <code>this</code> for easy method chaining
275         */
276        public PractitionerRoleAvailableTimeComponent setDaysOfWeek(List<Enumeration<DaysOfWeek>> theDaysOfWeek) { 
277          this.daysOfWeek = theDaysOfWeek;
278          return this;
279        }
280
281        public boolean hasDaysOfWeek() { 
282          if (this.daysOfWeek == null)
283            return false;
284          for (Enumeration<DaysOfWeek> item : this.daysOfWeek)
285            if (!item.isEmpty())
286              return true;
287          return false;
288        }
289
290        /**
291         * @return {@link #daysOfWeek} (Indicates which days of the week are available between the start and end Times.)
292         */
293        public Enumeration<DaysOfWeek> addDaysOfWeekElement() {//2 
294          Enumeration<DaysOfWeek> t = new Enumeration<DaysOfWeek>(new DaysOfWeekEnumFactory());
295          if (this.daysOfWeek == null)
296            this.daysOfWeek = new ArrayList<Enumeration<DaysOfWeek>>();
297          this.daysOfWeek.add(t);
298          return t;
299        }
300
301        /**
302         * @param value {@link #daysOfWeek} (Indicates which days of the week are available between the start and end Times.)
303         */
304        public PractitionerRoleAvailableTimeComponent addDaysOfWeek(DaysOfWeek value) { //1
305          Enumeration<DaysOfWeek> t = new Enumeration<DaysOfWeek>(new DaysOfWeekEnumFactory());
306          t.setValue(value);
307          if (this.daysOfWeek == null)
308            this.daysOfWeek = new ArrayList<Enumeration<DaysOfWeek>>();
309          this.daysOfWeek.add(t);
310          return this;
311        }
312
313        /**
314         * @param value {@link #daysOfWeek} (Indicates which days of the week are available between the start and end Times.)
315         */
316        public boolean hasDaysOfWeek(DaysOfWeek value) { 
317          if (this.daysOfWeek == null)
318            return false;
319          for (Enumeration<DaysOfWeek> v : this.daysOfWeek)
320            if (v.getValue().equals(value)) // code
321              return true;
322          return false;
323        }
324
325        /**
326         * @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
327         */
328        public BooleanType getAllDayElement() { 
329          if (this.allDay == null)
330            if (Configuration.errorOnAutoCreate())
331              throw new Error("Attempt to auto-create PractitionerRoleAvailableTimeComponent.allDay");
332            else if (Configuration.doAutoCreate())
333              this.allDay = new BooleanType(); // bb
334          return this.allDay;
335        }
336
337        public boolean hasAllDayElement() { 
338          return this.allDay != null && !this.allDay.isEmpty();
339        }
340
341        public boolean hasAllDay() { 
342          return this.allDay != null && !this.allDay.isEmpty();
343        }
344
345        /**
346         * @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
347         */
348        public PractitionerRoleAvailableTimeComponent setAllDayElement(BooleanType value) { 
349          this.allDay = value;
350          return this;
351        }
352
353        /**
354         * @return Is this always available? (hence times are irrelevant) e.g. 24 hour service.
355         */
356        public boolean getAllDay() { 
357          return this.allDay == null || this.allDay.isEmpty() ? false : this.allDay.getValue();
358        }
359
360        /**
361         * @param value Is this always available? (hence times are irrelevant) e.g. 24 hour service.
362         */
363        public PractitionerRoleAvailableTimeComponent setAllDay(boolean value) { 
364            if (this.allDay == null)
365              this.allDay = new BooleanType();
366            this.allDay.setValue(value);
367          return this;
368        }
369
370        /**
371         * @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
372         */
373        public TimeType getAvailableStartTimeElement() { 
374          if (this.availableStartTime == null)
375            if (Configuration.errorOnAutoCreate())
376              throw new Error("Attempt to auto-create PractitionerRoleAvailableTimeComponent.availableStartTime");
377            else if (Configuration.doAutoCreate())
378              this.availableStartTime = new TimeType(); // bb
379          return this.availableStartTime;
380        }
381
382        public boolean hasAvailableStartTimeElement() { 
383          return this.availableStartTime != null && !this.availableStartTime.isEmpty();
384        }
385
386        public boolean hasAvailableStartTime() { 
387          return this.availableStartTime != null && !this.availableStartTime.isEmpty();
388        }
389
390        /**
391         * @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
392         */
393        public PractitionerRoleAvailableTimeComponent setAvailableStartTimeElement(TimeType value) { 
394          this.availableStartTime = value;
395          return this;
396        }
397
398        /**
399         * @return The opening time of day. Note: If the AllDay flag is set, then this time is ignored.
400         */
401        public String getAvailableStartTime() { 
402          return this.availableStartTime == null ? null : this.availableStartTime.getValue();
403        }
404
405        /**
406         * @param value The opening time of day. Note: If the AllDay flag is set, then this time is ignored.
407         */
408        public PractitionerRoleAvailableTimeComponent setAvailableStartTime(String value) { 
409          if (value == null)
410            this.availableStartTime = null;
411          else {
412            if (this.availableStartTime == null)
413              this.availableStartTime = new TimeType();
414            this.availableStartTime.setValue(value);
415          }
416          return this;
417        }
418
419        /**
420         * @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
421         */
422        public TimeType getAvailableEndTimeElement() { 
423          if (this.availableEndTime == null)
424            if (Configuration.errorOnAutoCreate())
425              throw new Error("Attempt to auto-create PractitionerRoleAvailableTimeComponent.availableEndTime");
426            else if (Configuration.doAutoCreate())
427              this.availableEndTime = new TimeType(); // bb
428          return this.availableEndTime;
429        }
430
431        public boolean hasAvailableEndTimeElement() { 
432          return this.availableEndTime != null && !this.availableEndTime.isEmpty();
433        }
434
435        public boolean hasAvailableEndTime() { 
436          return this.availableEndTime != null && !this.availableEndTime.isEmpty();
437        }
438
439        /**
440         * @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
441         */
442        public PractitionerRoleAvailableTimeComponent setAvailableEndTimeElement(TimeType value) { 
443          this.availableEndTime = value;
444          return this;
445        }
446
447        /**
448         * @return The closing time of day. Note: If the AllDay flag is set, then this time is ignored.
449         */
450        public String getAvailableEndTime() { 
451          return this.availableEndTime == null ? null : this.availableEndTime.getValue();
452        }
453
454        /**
455         * @param value The closing time of day. Note: If the AllDay flag is set, then this time is ignored.
456         */
457        public PractitionerRoleAvailableTimeComponent setAvailableEndTime(String value) { 
458          if (value == null)
459            this.availableEndTime = null;
460          else {
461            if (this.availableEndTime == null)
462              this.availableEndTime = new TimeType();
463            this.availableEndTime.setValue(value);
464          }
465          return this;
466        }
467
468        protected void listChildren(List<Property> children) {
469          super.listChildren(children);
470          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));
471          children.add(new Property("allDay", "boolean", "Is this always available? (hence times are irrelevant) e.g. 24 hour service.", 0, 1, allDay));
472          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));
473          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));
474        }
475
476        @Override
477        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
478          switch (_hash) {
479          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);
480          case -1414913477: /*allDay*/  return new Property("allDay", "boolean", "Is this always available? (hence times are irrelevant) e.g. 24 hour service.", 0, 1, allDay);
481          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);
482          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);
483          default: return super.getNamedProperty(_hash, _name, _checkValid);
484          }
485
486        }
487
488      @Override
489      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
490        switch (hash) {
491        case 68050338: /*daysOfWeek*/ return this.daysOfWeek == null ? new Base[0] : this.daysOfWeek.toArray(new Base[this.daysOfWeek.size()]); // Enumeration<DaysOfWeek>
492        case -1414913477: /*allDay*/ return this.allDay == null ? new Base[0] : new Base[] {this.allDay}; // BooleanType
493        case -1039453818: /*availableStartTime*/ return this.availableStartTime == null ? new Base[0] : new Base[] {this.availableStartTime}; // TimeType
494        case 101151551: /*availableEndTime*/ return this.availableEndTime == null ? new Base[0] : new Base[] {this.availableEndTime}; // TimeType
495        default: return super.getProperty(hash, name, checkValid);
496        }
497
498      }
499
500      @Override
501      public Base setProperty(int hash, String name, Base value) throws FHIRException {
502        switch (hash) {
503        case 68050338: // daysOfWeek
504          value = new DaysOfWeekEnumFactory().fromType(castToCode(value));
505          this.getDaysOfWeek().add((Enumeration) value); // Enumeration<DaysOfWeek>
506          return value;
507        case -1414913477: // allDay
508          this.allDay = castToBoolean(value); // BooleanType
509          return value;
510        case -1039453818: // availableStartTime
511          this.availableStartTime = castToTime(value); // TimeType
512          return value;
513        case 101151551: // availableEndTime
514          this.availableEndTime = castToTime(value); // TimeType
515          return value;
516        default: return super.setProperty(hash, name, value);
517        }
518
519      }
520
521      @Override
522      public Base setProperty(String name, Base value) throws FHIRException {
523        if (name.equals("daysOfWeek")) {
524          value = new DaysOfWeekEnumFactory().fromType(castToCode(value));
525          this.getDaysOfWeek().add((Enumeration) value);
526        } else if (name.equals("allDay")) {
527          this.allDay = castToBoolean(value); // BooleanType
528        } else if (name.equals("availableStartTime")) {
529          this.availableStartTime = castToTime(value); // TimeType
530        } else if (name.equals("availableEndTime")) {
531          this.availableEndTime = castToTime(value); // TimeType
532        } else
533          return super.setProperty(name, value);
534        return value;
535      }
536
537      @Override
538      public Base makeProperty(int hash, String name) throws FHIRException {
539        switch (hash) {
540        case 68050338:  return addDaysOfWeekElement();
541        case -1414913477:  return getAllDayElement();
542        case -1039453818:  return getAvailableStartTimeElement();
543        case 101151551:  return getAvailableEndTimeElement();
544        default: return super.makeProperty(hash, name);
545        }
546
547      }
548
549      @Override
550      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
551        switch (hash) {
552        case 68050338: /*daysOfWeek*/ return new String[] {"code"};
553        case -1414913477: /*allDay*/ return new String[] {"boolean"};
554        case -1039453818: /*availableStartTime*/ return new String[] {"time"};
555        case 101151551: /*availableEndTime*/ return new String[] {"time"};
556        default: return super.getTypesForProperty(hash, name);
557        }
558
559      }
560
561      @Override
562      public Base addChild(String name) throws FHIRException {
563        if (name.equals("daysOfWeek")) {
564          throw new FHIRException("Cannot call addChild on a primitive type PractitionerRole.daysOfWeek");
565        }
566        else if (name.equals("allDay")) {
567          throw new FHIRException("Cannot call addChild on a primitive type PractitionerRole.allDay");
568        }
569        else if (name.equals("availableStartTime")) {
570          throw new FHIRException("Cannot call addChild on a primitive type PractitionerRole.availableStartTime");
571        }
572        else if (name.equals("availableEndTime")) {
573          throw new FHIRException("Cannot call addChild on a primitive type PractitionerRole.availableEndTime");
574        }
575        else
576          return super.addChild(name);
577      }
578
579      public PractitionerRoleAvailableTimeComponent copy() {
580        PractitionerRoleAvailableTimeComponent dst = new PractitionerRoleAvailableTimeComponent();
581        copyValues(dst);
582        if (daysOfWeek != null) {
583          dst.daysOfWeek = new ArrayList<Enumeration<DaysOfWeek>>();
584          for (Enumeration<DaysOfWeek> i : daysOfWeek)
585            dst.daysOfWeek.add(i.copy());
586        };
587        dst.allDay = allDay == null ? null : allDay.copy();
588        dst.availableStartTime = availableStartTime == null ? null : availableStartTime.copy();
589        dst.availableEndTime = availableEndTime == null ? null : availableEndTime.copy();
590        return dst;
591      }
592
593      @Override
594      public boolean equalsDeep(Base other_) {
595        if (!super.equalsDeep(other_))
596          return false;
597        if (!(other_ instanceof PractitionerRoleAvailableTimeComponent))
598          return false;
599        PractitionerRoleAvailableTimeComponent o = (PractitionerRoleAvailableTimeComponent) other_;
600        return compareDeep(daysOfWeek, o.daysOfWeek, true) && compareDeep(allDay, o.allDay, true) && compareDeep(availableStartTime, o.availableStartTime, true)
601           && compareDeep(availableEndTime, o.availableEndTime, true);
602      }
603
604      @Override
605      public boolean equalsShallow(Base other_) {
606        if (!super.equalsShallow(other_))
607          return false;
608        if (!(other_ instanceof PractitionerRoleAvailableTimeComponent))
609          return false;
610        PractitionerRoleAvailableTimeComponent o = (PractitionerRoleAvailableTimeComponent) other_;
611        return compareValues(daysOfWeek, o.daysOfWeek, true) && compareValues(allDay, o.allDay, true) && compareValues(availableStartTime, o.availableStartTime, true)
612           && compareValues(availableEndTime, o.availableEndTime, true);
613      }
614
615      public boolean isEmpty() {
616        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(daysOfWeek, allDay, availableStartTime
617          , availableEndTime);
618      }
619
620  public String fhirType() {
621    return "PractitionerRole.availableTime";
622
623  }
624
625  }
626
627    @Block()
628    public static class PractitionerRoleNotAvailableComponent extends BackboneElement implements IBaseBackboneElement {
629        /**
630         * The reason that can be presented to the user as to why this time is not available.
631         */
632        @Child(name = "description", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
633        @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." )
634        protected StringType description;
635
636        /**
637         * Service is not available (seasonally or for a public holiday) from this date.
638         */
639        @Child(name = "during", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=false)
640        @Description(shortDefinition="Service not availablefrom this date", formalDefinition="Service is not available (seasonally or for a public holiday) from this date." )
641        protected Period during;
642
643        private static final long serialVersionUID = 310849929L;
644
645    /**
646     * Constructor
647     */
648      public PractitionerRoleNotAvailableComponent() {
649        super();
650      }
651
652    /**
653     * Constructor
654     */
655      public PractitionerRoleNotAvailableComponent(StringType description) {
656        super();
657        this.description = description;
658      }
659
660        /**
661         * @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
662         */
663        public StringType getDescriptionElement() { 
664          if (this.description == null)
665            if (Configuration.errorOnAutoCreate())
666              throw new Error("Attempt to auto-create PractitionerRoleNotAvailableComponent.description");
667            else if (Configuration.doAutoCreate())
668              this.description = new StringType(); // bb
669          return this.description;
670        }
671
672        public boolean hasDescriptionElement() { 
673          return this.description != null && !this.description.isEmpty();
674        }
675
676        public boolean hasDescription() { 
677          return this.description != null && !this.description.isEmpty();
678        }
679
680        /**
681         * @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
682         */
683        public PractitionerRoleNotAvailableComponent setDescriptionElement(StringType value) { 
684          this.description = value;
685          return this;
686        }
687
688        /**
689         * @return The reason that can be presented to the user as to why this time is not available.
690         */
691        public String getDescription() { 
692          return this.description == null ? null : this.description.getValue();
693        }
694
695        /**
696         * @param value The reason that can be presented to the user as to why this time is not available.
697         */
698        public PractitionerRoleNotAvailableComponent setDescription(String value) { 
699            if (this.description == null)
700              this.description = new StringType();
701            this.description.setValue(value);
702          return this;
703        }
704
705        /**
706         * @return {@link #during} (Service is not available (seasonally or for a public holiday) from this date.)
707         */
708        public Period getDuring() { 
709          if (this.during == null)
710            if (Configuration.errorOnAutoCreate())
711              throw new Error("Attempt to auto-create PractitionerRoleNotAvailableComponent.during");
712            else if (Configuration.doAutoCreate())
713              this.during = new Period(); // cc
714          return this.during;
715        }
716
717        public boolean hasDuring() { 
718          return this.during != null && !this.during.isEmpty();
719        }
720
721        /**
722         * @param value {@link #during} (Service is not available (seasonally or for a public holiday) from this date.)
723         */
724        public PractitionerRoleNotAvailableComponent setDuring(Period value)  { 
725          this.during = value;
726          return this;
727        }
728
729        protected void listChildren(List<Property> children) {
730          super.listChildren(children);
731          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));
732          children.add(new Property("during", "Period", "Service is not available (seasonally or for a public holiday) from this date.", 0, 1, during));
733        }
734
735        @Override
736        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
737          switch (_hash) {
738          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);
739          case -1320499647: /*during*/  return new Property("during", "Period", "Service is not available (seasonally or for a public holiday) from this date.", 0, 1, during);
740          default: return super.getNamedProperty(_hash, _name, _checkValid);
741          }
742
743        }
744
745      @Override
746      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
747        switch (hash) {
748        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
749        case -1320499647: /*during*/ return this.during == null ? new Base[0] : new Base[] {this.during}; // Period
750        default: return super.getProperty(hash, name, checkValid);
751        }
752
753      }
754
755      @Override
756      public Base setProperty(int hash, String name, Base value) throws FHIRException {
757        switch (hash) {
758        case -1724546052: // description
759          this.description = castToString(value); // StringType
760          return value;
761        case -1320499647: // during
762          this.during = castToPeriod(value); // Period
763          return value;
764        default: return super.setProperty(hash, name, value);
765        }
766
767      }
768
769      @Override
770      public Base setProperty(String name, Base value) throws FHIRException {
771        if (name.equals("description")) {
772          this.description = castToString(value); // StringType
773        } else if (name.equals("during")) {
774          this.during = castToPeriod(value); // Period
775        } else
776          return super.setProperty(name, value);
777        return value;
778      }
779
780      @Override
781      public Base makeProperty(int hash, String name) throws FHIRException {
782        switch (hash) {
783        case -1724546052:  return getDescriptionElement();
784        case -1320499647:  return getDuring(); 
785        default: return super.makeProperty(hash, name);
786        }
787
788      }
789
790      @Override
791      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
792        switch (hash) {
793        case -1724546052: /*description*/ return new String[] {"string"};
794        case -1320499647: /*during*/ return new String[] {"Period"};
795        default: return super.getTypesForProperty(hash, name);
796        }
797
798      }
799
800      @Override
801      public Base addChild(String name) throws FHIRException {
802        if (name.equals("description")) {
803          throw new FHIRException("Cannot call addChild on a primitive type PractitionerRole.description");
804        }
805        else if (name.equals("during")) {
806          this.during = new Period();
807          return this.during;
808        }
809        else
810          return super.addChild(name);
811      }
812
813      public PractitionerRoleNotAvailableComponent copy() {
814        PractitionerRoleNotAvailableComponent dst = new PractitionerRoleNotAvailableComponent();
815        copyValues(dst);
816        dst.description = description == null ? null : description.copy();
817        dst.during = during == null ? null : during.copy();
818        return dst;
819      }
820
821      @Override
822      public boolean equalsDeep(Base other_) {
823        if (!super.equalsDeep(other_))
824          return false;
825        if (!(other_ instanceof PractitionerRoleNotAvailableComponent))
826          return false;
827        PractitionerRoleNotAvailableComponent o = (PractitionerRoleNotAvailableComponent) other_;
828        return compareDeep(description, o.description, true) && compareDeep(during, o.during, true);
829      }
830
831      @Override
832      public boolean equalsShallow(Base other_) {
833        if (!super.equalsShallow(other_))
834          return false;
835        if (!(other_ instanceof PractitionerRoleNotAvailableComponent))
836          return false;
837        PractitionerRoleNotAvailableComponent o = (PractitionerRoleNotAvailableComponent) other_;
838        return compareValues(description, o.description, true);
839      }
840
841      public boolean isEmpty() {
842        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(description, during);
843      }
844
845  public String fhirType() {
846    return "PractitionerRole.notAvailable";
847
848  }
849
850  }
851
852    /**
853     * Business Identifiers that are specific to a role/location.
854     */
855    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
856    @Description(shortDefinition="Business Identifiers that are specific to a role/location", formalDefinition="Business Identifiers that are specific to a role/location." )
857    protected List<Identifier> identifier;
858
859    /**
860     * Whether this practitioner's record is in active use.
861     */
862    @Child(name = "active", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=true)
863    @Description(shortDefinition="Whether this practitioner's record is in active use", formalDefinition="Whether this practitioner's record is in active use." )
864    protected BooleanType active;
865
866    /**
867     * The period during which the person is authorized to act as a practitioner in these role(s) for the organization.
868     */
869    @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=true)
870    @Description(shortDefinition="The period during which the practitioner is authorized to perform in these role(s)", formalDefinition="The period during which the person is authorized to act as a practitioner in these role(s) for the organization." )
871    protected Period period;
872
873    /**
874     * Practitioner that is able to provide the defined services for the organation.
875     */
876    @Child(name = "practitioner", type = {Practitioner.class}, order=3, min=0, max=1, modifier=false, summary=true)
877    @Description(shortDefinition="Practitioner that is able to provide the defined services for the organation", formalDefinition="Practitioner that is able to provide the defined services for the organation." )
878    protected Reference practitioner;
879
880    /**
881     * The actual object that is the target of the reference (Practitioner that is able to provide the defined services for the organation.)
882     */
883    protected Practitioner practitionerTarget;
884
885    /**
886     * The organization where the Practitioner performs the roles associated.
887     */
888    @Child(name = "organization", type = {Organization.class}, order=4, min=0, max=1, modifier=false, summary=true)
889    @Description(shortDefinition="Organization where the roles are available", formalDefinition="The organization where the Practitioner performs the roles associated." )
890    protected Reference organization;
891
892    /**
893     * The actual object that is the target of the reference (The organization where the Practitioner performs the roles associated.)
894     */
895    protected Organization organizationTarget;
896
897    /**
898     * Roles which this practitioner is authorized to perform for the organization.
899     */
900    @Child(name = "code", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
901    @Description(shortDefinition="Roles which this practitioner may perform", formalDefinition="Roles which this practitioner is authorized to perform for the organization." )
902    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/practitioner-role")
903    protected List<CodeableConcept> code;
904
905    /**
906     * Specific specialty of the practitioner.
907     */
908    @Child(name = "specialty", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
909    @Description(shortDefinition="Specific specialty of the practitioner", formalDefinition="Specific specialty of the practitioner." )
910    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/c80-practice-codes")
911    protected List<CodeableConcept> specialty;
912
913    /**
914     * The location(s) at which this practitioner provides care.
915     */
916    @Child(name = "location", type = {Location.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
917    @Description(shortDefinition="The location(s) at which this practitioner provides care", formalDefinition="The location(s) at which this practitioner provides care." )
918    protected List<Reference> location;
919    /**
920     * The actual objects that are the target of the reference (The location(s) at which this practitioner provides care.)
921     */
922    protected List<Location> locationTarget;
923
924
925    /**
926     * The list of healthcare services that this worker provides for this role's Organization/Location(s).
927     */
928    @Child(name = "healthcareService", type = {HealthcareService.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
929    @Description(shortDefinition="The list of healthcare services that this worker provides for this role's Organization/Location(s)", formalDefinition="The list of healthcare services that this worker provides for this role's Organization/Location(s)." )
930    protected List<Reference> healthcareService;
931    /**
932     * The actual objects that are the target of the reference (The list of healthcare services that this worker provides for this role's Organization/Location(s).)
933     */
934    protected List<HealthcareService> healthcareServiceTarget;
935
936
937    /**
938     * Contact details that are specific to the role/location/service.
939     */
940    @Child(name = "telecom", type = {ContactPoint.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
941    @Description(shortDefinition="Contact details that are specific to the role/location/service", formalDefinition="Contact details that are specific to the role/location/service." )
942    protected List<ContactPoint> telecom;
943
944    /**
945     * A collection of times that the Service Site is available.
946     */
947    @Child(name = "availableTime", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
948    @Description(shortDefinition="Times the Service Site is available", formalDefinition="A collection of times that the Service Site is available." )
949    protected List<PractitionerRoleAvailableTimeComponent> availableTime;
950
951    /**
952     * The HealthcareService is not available during this period of time due to the provided reason.
953     */
954    @Child(name = "notAvailable", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
955    @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." )
956    protected List<PractitionerRoleNotAvailableComponent> notAvailable;
957
958    /**
959     * 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.
960     */
961    @Child(name = "availabilityExceptions", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=false)
962    @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." )
963    protected StringType availabilityExceptions;
964
965    /**
966     * Technical endpoints providing access to services operated for the practitioner with this role.
967     */
968    @Child(name = "endpoint", type = {Endpoint.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
969    @Description(shortDefinition="Technical endpoints providing access to services operated for the practitioner with this role", formalDefinition="Technical endpoints providing access to services operated for the practitioner with this role." )
970    protected List<Reference> endpoint;
971    /**
972     * The actual objects that are the target of the reference (Technical endpoints providing access to services operated for the practitioner with this role.)
973     */
974    protected List<Endpoint> endpointTarget;
975
976
977    private static final long serialVersionUID = 423338051L;
978
979  /**
980   * Constructor
981   */
982    public PractitionerRole() {
983      super();
984    }
985
986    /**
987     * @return {@link #identifier} (Business Identifiers that are specific to a role/location.)
988     */
989    public List<Identifier> getIdentifier() { 
990      if (this.identifier == null)
991        this.identifier = new ArrayList<Identifier>();
992      return this.identifier;
993    }
994
995    /**
996     * @return Returns a reference to <code>this</code> for easy method chaining
997     */
998    public PractitionerRole setIdentifier(List<Identifier> theIdentifier) { 
999      this.identifier = theIdentifier;
1000      return this;
1001    }
1002
1003    public boolean hasIdentifier() { 
1004      if (this.identifier == null)
1005        return false;
1006      for (Identifier item : this.identifier)
1007        if (!item.isEmpty())
1008          return true;
1009      return false;
1010    }
1011
1012    public Identifier addIdentifier() { //3
1013      Identifier t = new Identifier();
1014      if (this.identifier == null)
1015        this.identifier = new ArrayList<Identifier>();
1016      this.identifier.add(t);
1017      return t;
1018    }
1019
1020    public PractitionerRole addIdentifier(Identifier t) { //3
1021      if (t == null)
1022        return this;
1023      if (this.identifier == null)
1024        this.identifier = new ArrayList<Identifier>();
1025      this.identifier.add(t);
1026      return this;
1027    }
1028
1029    /**
1030     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
1031     */
1032    public Identifier getIdentifierFirstRep() { 
1033      if (getIdentifier().isEmpty()) {
1034        addIdentifier();
1035      }
1036      return getIdentifier().get(0);
1037    }
1038
1039    /**
1040     * @return {@link #active} (Whether this practitioner's record is in active use.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value
1041     */
1042    public BooleanType getActiveElement() { 
1043      if (this.active == null)
1044        if (Configuration.errorOnAutoCreate())
1045          throw new Error("Attempt to auto-create PractitionerRole.active");
1046        else if (Configuration.doAutoCreate())
1047          this.active = new BooleanType(); // bb
1048      return this.active;
1049    }
1050
1051    public boolean hasActiveElement() { 
1052      return this.active != null && !this.active.isEmpty();
1053    }
1054
1055    public boolean hasActive() { 
1056      return this.active != null && !this.active.isEmpty();
1057    }
1058
1059    /**
1060     * @param value {@link #active} (Whether this practitioner's record is in active use.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value
1061     */
1062    public PractitionerRole setActiveElement(BooleanType value) { 
1063      this.active = value;
1064      return this;
1065    }
1066
1067    /**
1068     * @return Whether this practitioner's record is in active use.
1069     */
1070    public boolean getActive() { 
1071      return this.active == null || this.active.isEmpty() ? false : this.active.getValue();
1072    }
1073
1074    /**
1075     * @param value Whether this practitioner's record is in active use.
1076     */
1077    public PractitionerRole setActive(boolean value) { 
1078        if (this.active == null)
1079          this.active = new BooleanType();
1080        this.active.setValue(value);
1081      return this;
1082    }
1083
1084    /**
1085     * @return {@link #period} (The period during which the person is authorized to act as a practitioner in these role(s) for the organization.)
1086     */
1087    public Period getPeriod() { 
1088      if (this.period == null)
1089        if (Configuration.errorOnAutoCreate())
1090          throw new Error("Attempt to auto-create PractitionerRole.period");
1091        else if (Configuration.doAutoCreate())
1092          this.period = new Period(); // cc
1093      return this.period;
1094    }
1095
1096    public boolean hasPeriod() { 
1097      return this.period != null && !this.period.isEmpty();
1098    }
1099
1100    /**
1101     * @param value {@link #period} (The period during which the person is authorized to act as a practitioner in these role(s) for the organization.)
1102     */
1103    public PractitionerRole setPeriod(Period value)  { 
1104      this.period = value;
1105      return this;
1106    }
1107
1108    /**
1109     * @return {@link #practitioner} (Practitioner that is able to provide the defined services for the organation.)
1110     */
1111    public Reference getPractitioner() { 
1112      if (this.practitioner == null)
1113        if (Configuration.errorOnAutoCreate())
1114          throw new Error("Attempt to auto-create PractitionerRole.practitioner");
1115        else if (Configuration.doAutoCreate())
1116          this.practitioner = new Reference(); // cc
1117      return this.practitioner;
1118    }
1119
1120    public boolean hasPractitioner() { 
1121      return this.practitioner != null && !this.practitioner.isEmpty();
1122    }
1123
1124    /**
1125     * @param value {@link #practitioner} (Practitioner that is able to provide the defined services for the organation.)
1126     */
1127    public PractitionerRole setPractitioner(Reference value)  { 
1128      this.practitioner = value;
1129      return this;
1130    }
1131
1132    /**
1133     * @return {@link #practitioner} 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. (Practitioner that is able to provide the defined services for the organation.)
1134     */
1135    public Practitioner getPractitionerTarget() { 
1136      if (this.practitionerTarget == null)
1137        if (Configuration.errorOnAutoCreate())
1138          throw new Error("Attempt to auto-create PractitionerRole.practitioner");
1139        else if (Configuration.doAutoCreate())
1140          this.practitionerTarget = new Practitioner(); // aa
1141      return this.practitionerTarget;
1142    }
1143
1144    /**
1145     * @param value {@link #practitioner} 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. (Practitioner that is able to provide the defined services for the organation.)
1146     */
1147    public PractitionerRole setPractitionerTarget(Practitioner value) { 
1148      this.practitionerTarget = value;
1149      return this;
1150    }
1151
1152    /**
1153     * @return {@link #organization} (The organization where the Practitioner performs the roles associated.)
1154     */
1155    public Reference getOrganization() { 
1156      if (this.organization == null)
1157        if (Configuration.errorOnAutoCreate())
1158          throw new Error("Attempt to auto-create PractitionerRole.organization");
1159        else if (Configuration.doAutoCreate())
1160          this.organization = new Reference(); // cc
1161      return this.organization;
1162    }
1163
1164    public boolean hasOrganization() { 
1165      return this.organization != null && !this.organization.isEmpty();
1166    }
1167
1168    /**
1169     * @param value {@link #organization} (The organization where the Practitioner performs the roles associated.)
1170     */
1171    public PractitionerRole setOrganization(Reference value)  { 
1172      this.organization = value;
1173      return this;
1174    }
1175
1176    /**
1177     * @return {@link #organization} 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 where the Practitioner performs the roles associated.)
1178     */
1179    public Organization getOrganizationTarget() { 
1180      if (this.organizationTarget == null)
1181        if (Configuration.errorOnAutoCreate())
1182          throw new Error("Attempt to auto-create PractitionerRole.organization");
1183        else if (Configuration.doAutoCreate())
1184          this.organizationTarget = new Organization(); // aa
1185      return this.organizationTarget;
1186    }
1187
1188    /**
1189     * @param value {@link #organization} 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 where the Practitioner performs the roles associated.)
1190     */
1191    public PractitionerRole setOrganizationTarget(Organization value) { 
1192      this.organizationTarget = value;
1193      return this;
1194    }
1195
1196    /**
1197     * @return {@link #code} (Roles which this practitioner is authorized to perform for the organization.)
1198     */
1199    public List<CodeableConcept> getCode() { 
1200      if (this.code == null)
1201        this.code = new ArrayList<CodeableConcept>();
1202      return this.code;
1203    }
1204
1205    /**
1206     * @return Returns a reference to <code>this</code> for easy method chaining
1207     */
1208    public PractitionerRole setCode(List<CodeableConcept> theCode) { 
1209      this.code = theCode;
1210      return this;
1211    }
1212
1213    public boolean hasCode() { 
1214      if (this.code == null)
1215        return false;
1216      for (CodeableConcept item : this.code)
1217        if (!item.isEmpty())
1218          return true;
1219      return false;
1220    }
1221
1222    public CodeableConcept addCode() { //3
1223      CodeableConcept t = new CodeableConcept();
1224      if (this.code == null)
1225        this.code = new ArrayList<CodeableConcept>();
1226      this.code.add(t);
1227      return t;
1228    }
1229
1230    public PractitionerRole addCode(CodeableConcept t) { //3
1231      if (t == null)
1232        return this;
1233      if (this.code == null)
1234        this.code = new ArrayList<CodeableConcept>();
1235      this.code.add(t);
1236      return this;
1237    }
1238
1239    /**
1240     * @return The first repetition of repeating field {@link #code}, creating it if it does not already exist
1241     */
1242    public CodeableConcept getCodeFirstRep() { 
1243      if (getCode().isEmpty()) {
1244        addCode();
1245      }
1246      return getCode().get(0);
1247    }
1248
1249    /**
1250     * @return {@link #specialty} (Specific specialty of the practitioner.)
1251     */
1252    public List<CodeableConcept> getSpecialty() { 
1253      if (this.specialty == null)
1254        this.specialty = new ArrayList<CodeableConcept>();
1255      return this.specialty;
1256    }
1257
1258    /**
1259     * @return Returns a reference to <code>this</code> for easy method chaining
1260     */
1261    public PractitionerRole setSpecialty(List<CodeableConcept> theSpecialty) { 
1262      this.specialty = theSpecialty;
1263      return this;
1264    }
1265
1266    public boolean hasSpecialty() { 
1267      if (this.specialty == null)
1268        return false;
1269      for (CodeableConcept item : this.specialty)
1270        if (!item.isEmpty())
1271          return true;
1272      return false;
1273    }
1274
1275    public CodeableConcept addSpecialty() { //3
1276      CodeableConcept t = new CodeableConcept();
1277      if (this.specialty == null)
1278        this.specialty = new ArrayList<CodeableConcept>();
1279      this.specialty.add(t);
1280      return t;
1281    }
1282
1283    public PractitionerRole addSpecialty(CodeableConcept t) { //3
1284      if (t == null)
1285        return this;
1286      if (this.specialty == null)
1287        this.specialty = new ArrayList<CodeableConcept>();
1288      this.specialty.add(t);
1289      return this;
1290    }
1291
1292    /**
1293     * @return The first repetition of repeating field {@link #specialty}, creating it if it does not already exist
1294     */
1295    public CodeableConcept getSpecialtyFirstRep() { 
1296      if (getSpecialty().isEmpty()) {
1297        addSpecialty();
1298      }
1299      return getSpecialty().get(0);
1300    }
1301
1302    /**
1303     * @return {@link #location} (The location(s) at which this practitioner provides care.)
1304     */
1305    public List<Reference> getLocation() { 
1306      if (this.location == null)
1307        this.location = new ArrayList<Reference>();
1308      return this.location;
1309    }
1310
1311    /**
1312     * @return Returns a reference to <code>this</code> for easy method chaining
1313     */
1314    public PractitionerRole setLocation(List<Reference> theLocation) { 
1315      this.location = theLocation;
1316      return this;
1317    }
1318
1319    public boolean hasLocation() { 
1320      if (this.location == null)
1321        return false;
1322      for (Reference item : this.location)
1323        if (!item.isEmpty())
1324          return true;
1325      return false;
1326    }
1327
1328    public Reference addLocation() { //3
1329      Reference t = new Reference();
1330      if (this.location == null)
1331        this.location = new ArrayList<Reference>();
1332      this.location.add(t);
1333      return t;
1334    }
1335
1336    public PractitionerRole addLocation(Reference t) { //3
1337      if (t == null)
1338        return this;
1339      if (this.location == null)
1340        this.location = new ArrayList<Reference>();
1341      this.location.add(t);
1342      return this;
1343    }
1344
1345    /**
1346     * @return The first repetition of repeating field {@link #location}, creating it if it does not already exist
1347     */
1348    public Reference getLocationFirstRep() { 
1349      if (getLocation().isEmpty()) {
1350        addLocation();
1351      }
1352      return getLocation().get(0);
1353    }
1354
1355    /**
1356     * @deprecated Use Reference#setResource(IBaseResource) instead
1357     */
1358    @Deprecated
1359    public List<Location> getLocationTarget() { 
1360      if (this.locationTarget == null)
1361        this.locationTarget = new ArrayList<Location>();
1362      return this.locationTarget;
1363    }
1364
1365    /**
1366     * @deprecated Use Reference#setResource(IBaseResource) instead
1367     */
1368    @Deprecated
1369    public Location addLocationTarget() { 
1370      Location r = new Location();
1371      if (this.locationTarget == null)
1372        this.locationTarget = new ArrayList<Location>();
1373      this.locationTarget.add(r);
1374      return r;
1375    }
1376
1377    /**
1378     * @return {@link #healthcareService} (The list of healthcare services that this worker provides for this role's Organization/Location(s).)
1379     */
1380    public List<Reference> getHealthcareService() { 
1381      if (this.healthcareService == null)
1382        this.healthcareService = new ArrayList<Reference>();
1383      return this.healthcareService;
1384    }
1385
1386    /**
1387     * @return Returns a reference to <code>this</code> for easy method chaining
1388     */
1389    public PractitionerRole setHealthcareService(List<Reference> theHealthcareService) { 
1390      this.healthcareService = theHealthcareService;
1391      return this;
1392    }
1393
1394    public boolean hasHealthcareService() { 
1395      if (this.healthcareService == null)
1396        return false;
1397      for (Reference item : this.healthcareService)
1398        if (!item.isEmpty())
1399          return true;
1400      return false;
1401    }
1402
1403    public Reference addHealthcareService() { //3
1404      Reference t = new Reference();
1405      if (this.healthcareService == null)
1406        this.healthcareService = new ArrayList<Reference>();
1407      this.healthcareService.add(t);
1408      return t;
1409    }
1410
1411    public PractitionerRole addHealthcareService(Reference t) { //3
1412      if (t == null)
1413        return this;
1414      if (this.healthcareService == null)
1415        this.healthcareService = new ArrayList<Reference>();
1416      this.healthcareService.add(t);
1417      return this;
1418    }
1419
1420    /**
1421     * @return The first repetition of repeating field {@link #healthcareService}, creating it if it does not already exist
1422     */
1423    public Reference getHealthcareServiceFirstRep() { 
1424      if (getHealthcareService().isEmpty()) {
1425        addHealthcareService();
1426      }
1427      return getHealthcareService().get(0);
1428    }
1429
1430    /**
1431     * @deprecated Use Reference#setResource(IBaseResource) instead
1432     */
1433    @Deprecated
1434    public List<HealthcareService> getHealthcareServiceTarget() { 
1435      if (this.healthcareServiceTarget == null)
1436        this.healthcareServiceTarget = new ArrayList<HealthcareService>();
1437      return this.healthcareServiceTarget;
1438    }
1439
1440    /**
1441     * @deprecated Use Reference#setResource(IBaseResource) instead
1442     */
1443    @Deprecated
1444    public HealthcareService addHealthcareServiceTarget() { 
1445      HealthcareService r = new HealthcareService();
1446      if (this.healthcareServiceTarget == null)
1447        this.healthcareServiceTarget = new ArrayList<HealthcareService>();
1448      this.healthcareServiceTarget.add(r);
1449      return r;
1450    }
1451
1452    /**
1453     * @return {@link #telecom} (Contact details that are specific to the role/location/service.)
1454     */
1455    public List<ContactPoint> getTelecom() { 
1456      if (this.telecom == null)
1457        this.telecom = new ArrayList<ContactPoint>();
1458      return this.telecom;
1459    }
1460
1461    /**
1462     * @return Returns a reference to <code>this</code> for easy method chaining
1463     */
1464    public PractitionerRole setTelecom(List<ContactPoint> theTelecom) { 
1465      this.telecom = theTelecom;
1466      return this;
1467    }
1468
1469    public boolean hasTelecom() { 
1470      if (this.telecom == null)
1471        return false;
1472      for (ContactPoint item : this.telecom)
1473        if (!item.isEmpty())
1474          return true;
1475      return false;
1476    }
1477
1478    public ContactPoint addTelecom() { //3
1479      ContactPoint t = new ContactPoint();
1480      if (this.telecom == null)
1481        this.telecom = new ArrayList<ContactPoint>();
1482      this.telecom.add(t);
1483      return t;
1484    }
1485
1486    public PractitionerRole addTelecom(ContactPoint t) { //3
1487      if (t == null)
1488        return this;
1489      if (this.telecom == null)
1490        this.telecom = new ArrayList<ContactPoint>();
1491      this.telecom.add(t);
1492      return this;
1493    }
1494
1495    /**
1496     * @return The first repetition of repeating field {@link #telecom}, creating it if it does not already exist
1497     */
1498    public ContactPoint getTelecomFirstRep() { 
1499      if (getTelecom().isEmpty()) {
1500        addTelecom();
1501      }
1502      return getTelecom().get(0);
1503    }
1504
1505    /**
1506     * @return {@link #availableTime} (A collection of times that the Service Site is available.)
1507     */
1508    public List<PractitionerRoleAvailableTimeComponent> getAvailableTime() { 
1509      if (this.availableTime == null)
1510        this.availableTime = new ArrayList<PractitionerRoleAvailableTimeComponent>();
1511      return this.availableTime;
1512    }
1513
1514    /**
1515     * @return Returns a reference to <code>this</code> for easy method chaining
1516     */
1517    public PractitionerRole setAvailableTime(List<PractitionerRoleAvailableTimeComponent> theAvailableTime) { 
1518      this.availableTime = theAvailableTime;
1519      return this;
1520    }
1521
1522    public boolean hasAvailableTime() { 
1523      if (this.availableTime == null)
1524        return false;
1525      for (PractitionerRoleAvailableTimeComponent item : this.availableTime)
1526        if (!item.isEmpty())
1527          return true;
1528      return false;
1529    }
1530
1531    public PractitionerRoleAvailableTimeComponent addAvailableTime() { //3
1532      PractitionerRoleAvailableTimeComponent t = new PractitionerRoleAvailableTimeComponent();
1533      if (this.availableTime == null)
1534        this.availableTime = new ArrayList<PractitionerRoleAvailableTimeComponent>();
1535      this.availableTime.add(t);
1536      return t;
1537    }
1538
1539    public PractitionerRole addAvailableTime(PractitionerRoleAvailableTimeComponent t) { //3
1540      if (t == null)
1541        return this;
1542      if (this.availableTime == null)
1543        this.availableTime = new ArrayList<PractitionerRoleAvailableTimeComponent>();
1544      this.availableTime.add(t);
1545      return this;
1546    }
1547
1548    /**
1549     * @return The first repetition of repeating field {@link #availableTime}, creating it if it does not already exist
1550     */
1551    public PractitionerRoleAvailableTimeComponent getAvailableTimeFirstRep() { 
1552      if (getAvailableTime().isEmpty()) {
1553        addAvailableTime();
1554      }
1555      return getAvailableTime().get(0);
1556    }
1557
1558    /**
1559     * @return {@link #notAvailable} (The HealthcareService is not available during this period of time due to the provided reason.)
1560     */
1561    public List<PractitionerRoleNotAvailableComponent> getNotAvailable() { 
1562      if (this.notAvailable == null)
1563        this.notAvailable = new ArrayList<PractitionerRoleNotAvailableComponent>();
1564      return this.notAvailable;
1565    }
1566
1567    /**
1568     * @return Returns a reference to <code>this</code> for easy method chaining
1569     */
1570    public PractitionerRole setNotAvailable(List<PractitionerRoleNotAvailableComponent> theNotAvailable) { 
1571      this.notAvailable = theNotAvailable;
1572      return this;
1573    }
1574
1575    public boolean hasNotAvailable() { 
1576      if (this.notAvailable == null)
1577        return false;
1578      for (PractitionerRoleNotAvailableComponent item : this.notAvailable)
1579        if (!item.isEmpty())
1580          return true;
1581      return false;
1582    }
1583
1584    public PractitionerRoleNotAvailableComponent addNotAvailable() { //3
1585      PractitionerRoleNotAvailableComponent t = new PractitionerRoleNotAvailableComponent();
1586      if (this.notAvailable == null)
1587        this.notAvailable = new ArrayList<PractitionerRoleNotAvailableComponent>();
1588      this.notAvailable.add(t);
1589      return t;
1590    }
1591
1592    public PractitionerRole addNotAvailable(PractitionerRoleNotAvailableComponent t) { //3
1593      if (t == null)
1594        return this;
1595      if (this.notAvailable == null)
1596        this.notAvailable = new ArrayList<PractitionerRoleNotAvailableComponent>();
1597      this.notAvailable.add(t);
1598      return this;
1599    }
1600
1601    /**
1602     * @return The first repetition of repeating field {@link #notAvailable}, creating it if it does not already exist
1603     */
1604    public PractitionerRoleNotAvailableComponent getNotAvailableFirstRep() { 
1605      if (getNotAvailable().isEmpty()) {
1606        addNotAvailable();
1607      }
1608      return getNotAvailable().get(0);
1609    }
1610
1611    /**
1612     * @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
1613     */
1614    public StringType getAvailabilityExceptionsElement() { 
1615      if (this.availabilityExceptions == null)
1616        if (Configuration.errorOnAutoCreate())
1617          throw new Error("Attempt to auto-create PractitionerRole.availabilityExceptions");
1618        else if (Configuration.doAutoCreate())
1619          this.availabilityExceptions = new StringType(); // bb
1620      return this.availabilityExceptions;
1621    }
1622
1623    public boolean hasAvailabilityExceptionsElement() { 
1624      return this.availabilityExceptions != null && !this.availabilityExceptions.isEmpty();
1625    }
1626
1627    public boolean hasAvailabilityExceptions() { 
1628      return this.availabilityExceptions != null && !this.availabilityExceptions.isEmpty();
1629    }
1630
1631    /**
1632     * @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
1633     */
1634    public PractitionerRole setAvailabilityExceptionsElement(StringType value) { 
1635      this.availabilityExceptions = value;
1636      return this;
1637    }
1638
1639    /**
1640     * @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.
1641     */
1642    public String getAvailabilityExceptions() { 
1643      return this.availabilityExceptions == null ? null : this.availabilityExceptions.getValue();
1644    }
1645
1646    /**
1647     * @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.
1648     */
1649    public PractitionerRole setAvailabilityExceptions(String value) { 
1650      if (Utilities.noString(value))
1651        this.availabilityExceptions = null;
1652      else {
1653        if (this.availabilityExceptions == null)
1654          this.availabilityExceptions = new StringType();
1655        this.availabilityExceptions.setValue(value);
1656      }
1657      return this;
1658    }
1659
1660    /**
1661     * @return {@link #endpoint} (Technical endpoints providing access to services operated for the practitioner with this role.)
1662     */
1663    public List<Reference> getEndpoint() { 
1664      if (this.endpoint == null)
1665        this.endpoint = new ArrayList<Reference>();
1666      return this.endpoint;
1667    }
1668
1669    /**
1670     * @return Returns a reference to <code>this</code> for easy method chaining
1671     */
1672    public PractitionerRole setEndpoint(List<Reference> theEndpoint) { 
1673      this.endpoint = theEndpoint;
1674      return this;
1675    }
1676
1677    public boolean hasEndpoint() { 
1678      if (this.endpoint == null)
1679        return false;
1680      for (Reference item : this.endpoint)
1681        if (!item.isEmpty())
1682          return true;
1683      return false;
1684    }
1685
1686    public Reference addEndpoint() { //3
1687      Reference t = new Reference();
1688      if (this.endpoint == null)
1689        this.endpoint = new ArrayList<Reference>();
1690      this.endpoint.add(t);
1691      return t;
1692    }
1693
1694    public PractitionerRole addEndpoint(Reference t) { //3
1695      if (t == null)
1696        return this;
1697      if (this.endpoint == null)
1698        this.endpoint = new ArrayList<Reference>();
1699      this.endpoint.add(t);
1700      return this;
1701    }
1702
1703    /**
1704     * @return The first repetition of repeating field {@link #endpoint}, creating it if it does not already exist
1705     */
1706    public Reference getEndpointFirstRep() { 
1707      if (getEndpoint().isEmpty()) {
1708        addEndpoint();
1709      }
1710      return getEndpoint().get(0);
1711    }
1712
1713    /**
1714     * @deprecated Use Reference#setResource(IBaseResource) instead
1715     */
1716    @Deprecated
1717    public List<Endpoint> getEndpointTarget() { 
1718      if (this.endpointTarget == null)
1719        this.endpointTarget = new ArrayList<Endpoint>();
1720      return this.endpointTarget;
1721    }
1722
1723    /**
1724     * @deprecated Use Reference#setResource(IBaseResource) instead
1725     */
1726    @Deprecated
1727    public Endpoint addEndpointTarget() { 
1728      Endpoint r = new Endpoint();
1729      if (this.endpointTarget == null)
1730        this.endpointTarget = new ArrayList<Endpoint>();
1731      this.endpointTarget.add(r);
1732      return r;
1733    }
1734
1735      protected void listChildren(List<Property> children) {
1736        super.listChildren(children);
1737        children.add(new Property("identifier", "Identifier", "Business Identifiers that are specific to a role/location.", 0, java.lang.Integer.MAX_VALUE, identifier));
1738        children.add(new Property("active", "boolean", "Whether this practitioner's record is in active use.", 0, 1, active));
1739        children.add(new Property("period", "Period", "The period during which the person is authorized to act as a practitioner in these role(s) for the organization.", 0, 1, period));
1740        children.add(new Property("practitioner", "Reference(Practitioner)", "Practitioner that is able to provide the defined services for the organation.", 0, 1, practitioner));
1741        children.add(new Property("organization", "Reference(Organization)", "The organization where the Practitioner performs the roles associated.", 0, 1, organization));
1742        children.add(new Property("code", "CodeableConcept", "Roles which this practitioner is authorized to perform for the organization.", 0, java.lang.Integer.MAX_VALUE, code));
1743        children.add(new Property("specialty", "CodeableConcept", "Specific specialty of the practitioner.", 0, java.lang.Integer.MAX_VALUE, specialty));
1744        children.add(new Property("location", "Reference(Location)", "The location(s) at which this practitioner provides care.", 0, java.lang.Integer.MAX_VALUE, location));
1745        children.add(new Property("healthcareService", "Reference(HealthcareService)", "The list of healthcare services that this worker provides for this role's Organization/Location(s).", 0, java.lang.Integer.MAX_VALUE, healthcareService));
1746        children.add(new Property("telecom", "ContactPoint", "Contact details that are specific to the role/location/service.", 0, java.lang.Integer.MAX_VALUE, telecom));
1747        children.add(new Property("availableTime", "", "A collection of times that the Service Site is available.", 0, java.lang.Integer.MAX_VALUE, availableTime));
1748        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));
1749        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));
1750        children.add(new Property("endpoint", "Reference(Endpoint)", "Technical endpoints providing access to services operated for the practitioner with this role.", 0, java.lang.Integer.MAX_VALUE, endpoint));
1751      }
1752
1753      @Override
1754      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1755        switch (_hash) {
1756        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Business Identifiers that are specific to a role/location.", 0, java.lang.Integer.MAX_VALUE, identifier);
1757        case -1422950650: /*active*/  return new Property("active", "boolean", "Whether this practitioner's record is in active use.", 0, 1, active);
1758        case -991726143: /*period*/  return new Property("period", "Period", "The period during which the person is authorized to act as a practitioner in these role(s) for the organization.", 0, 1, period);
1759        case 574573338: /*practitioner*/  return new Property("practitioner", "Reference(Practitioner)", "Practitioner that is able to provide the defined services for the organation.", 0, 1, practitioner);
1760        case 1178922291: /*organization*/  return new Property("organization", "Reference(Organization)", "The organization where the Practitioner performs the roles associated.", 0, 1, organization);
1761        case 3059181: /*code*/  return new Property("code", "CodeableConcept", "Roles which this practitioner is authorized to perform for the organization.", 0, java.lang.Integer.MAX_VALUE, code);
1762        case -1694759682: /*specialty*/  return new Property("specialty", "CodeableConcept", "Specific specialty of the practitioner.", 0, java.lang.Integer.MAX_VALUE, specialty);
1763        case 1901043637: /*location*/  return new Property("location", "Reference(Location)", "The location(s) at which this practitioner provides care.", 0, java.lang.Integer.MAX_VALUE, location);
1764        case 1289661064: /*healthcareService*/  return new Property("healthcareService", "Reference(HealthcareService)", "The list of healthcare services that this worker provides for this role's Organization/Location(s).", 0, java.lang.Integer.MAX_VALUE, healthcareService);
1765        case -1429363305: /*telecom*/  return new Property("telecom", "ContactPoint", "Contact details that are specific to the role/location/service.", 0, java.lang.Integer.MAX_VALUE, telecom);
1766        case 1873069366: /*availableTime*/  return new Property("availableTime", "", "A collection of times that the Service Site is available.", 0, java.lang.Integer.MAX_VALUE, availableTime);
1767        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);
1768        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);
1769        case 1741102485: /*endpoint*/  return new Property("endpoint", "Reference(Endpoint)", "Technical endpoints providing access to services operated for the practitioner with this role.", 0, java.lang.Integer.MAX_VALUE, endpoint);
1770        default: return super.getNamedProperty(_hash, _name, _checkValid);
1771        }
1772
1773      }
1774
1775      @Override
1776      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1777        switch (hash) {
1778        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1779        case -1422950650: /*active*/ return this.active == null ? new Base[0] : new Base[] {this.active}; // BooleanType
1780        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
1781        case 574573338: /*practitioner*/ return this.practitioner == null ? new Base[0] : new Base[] {this.practitioner}; // Reference
1782        case 1178922291: /*organization*/ return this.organization == null ? new Base[0] : new Base[] {this.organization}; // Reference
1783        case 3059181: /*code*/ return this.code == null ? new Base[0] : this.code.toArray(new Base[this.code.size()]); // CodeableConcept
1784        case -1694759682: /*specialty*/ return this.specialty == null ? new Base[0] : this.specialty.toArray(new Base[this.specialty.size()]); // CodeableConcept
1785        case 1901043637: /*location*/ return this.location == null ? new Base[0] : this.location.toArray(new Base[this.location.size()]); // Reference
1786        case 1289661064: /*healthcareService*/ return this.healthcareService == null ? new Base[0] : this.healthcareService.toArray(new Base[this.healthcareService.size()]); // Reference
1787        case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint
1788        case 1873069366: /*availableTime*/ return this.availableTime == null ? new Base[0] : this.availableTime.toArray(new Base[this.availableTime.size()]); // PractitionerRoleAvailableTimeComponent
1789        case -629572298: /*notAvailable*/ return this.notAvailable == null ? new Base[0] : this.notAvailable.toArray(new Base[this.notAvailable.size()]); // PractitionerRoleNotAvailableComponent
1790        case -1149143617: /*availabilityExceptions*/ return this.availabilityExceptions == null ? new Base[0] : new Base[] {this.availabilityExceptions}; // StringType
1791        case 1741102485: /*endpoint*/ return this.endpoint == null ? new Base[0] : this.endpoint.toArray(new Base[this.endpoint.size()]); // Reference
1792        default: return super.getProperty(hash, name, checkValid);
1793        }
1794
1795      }
1796
1797      @Override
1798      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1799        switch (hash) {
1800        case -1618432855: // identifier
1801          this.getIdentifier().add(castToIdentifier(value)); // Identifier
1802          return value;
1803        case -1422950650: // active
1804          this.active = castToBoolean(value); // BooleanType
1805          return value;
1806        case -991726143: // period
1807          this.period = castToPeriod(value); // Period
1808          return value;
1809        case 574573338: // practitioner
1810          this.practitioner = castToReference(value); // Reference
1811          return value;
1812        case 1178922291: // organization
1813          this.organization = castToReference(value); // Reference
1814          return value;
1815        case 3059181: // code
1816          this.getCode().add(castToCodeableConcept(value)); // CodeableConcept
1817          return value;
1818        case -1694759682: // specialty
1819          this.getSpecialty().add(castToCodeableConcept(value)); // CodeableConcept
1820          return value;
1821        case 1901043637: // location
1822          this.getLocation().add(castToReference(value)); // Reference
1823          return value;
1824        case 1289661064: // healthcareService
1825          this.getHealthcareService().add(castToReference(value)); // Reference
1826          return value;
1827        case -1429363305: // telecom
1828          this.getTelecom().add(castToContactPoint(value)); // ContactPoint
1829          return value;
1830        case 1873069366: // availableTime
1831          this.getAvailableTime().add((PractitionerRoleAvailableTimeComponent) value); // PractitionerRoleAvailableTimeComponent
1832          return value;
1833        case -629572298: // notAvailable
1834          this.getNotAvailable().add((PractitionerRoleNotAvailableComponent) value); // PractitionerRoleNotAvailableComponent
1835          return value;
1836        case -1149143617: // availabilityExceptions
1837          this.availabilityExceptions = castToString(value); // StringType
1838          return value;
1839        case 1741102485: // endpoint
1840          this.getEndpoint().add(castToReference(value)); // Reference
1841          return value;
1842        default: return super.setProperty(hash, name, value);
1843        }
1844
1845      }
1846
1847      @Override
1848      public Base setProperty(String name, Base value) throws FHIRException {
1849        if (name.equals("identifier")) {
1850          this.getIdentifier().add(castToIdentifier(value));
1851        } else if (name.equals("active")) {
1852          this.active = castToBoolean(value); // BooleanType
1853        } else if (name.equals("period")) {
1854          this.period = castToPeriod(value); // Period
1855        } else if (name.equals("practitioner")) {
1856          this.practitioner = castToReference(value); // Reference
1857        } else if (name.equals("organization")) {
1858          this.organization = castToReference(value); // Reference
1859        } else if (name.equals("code")) {
1860          this.getCode().add(castToCodeableConcept(value));
1861        } else if (name.equals("specialty")) {
1862          this.getSpecialty().add(castToCodeableConcept(value));
1863        } else if (name.equals("location")) {
1864          this.getLocation().add(castToReference(value));
1865        } else if (name.equals("healthcareService")) {
1866          this.getHealthcareService().add(castToReference(value));
1867        } else if (name.equals("telecom")) {
1868          this.getTelecom().add(castToContactPoint(value));
1869        } else if (name.equals("availableTime")) {
1870          this.getAvailableTime().add((PractitionerRoleAvailableTimeComponent) value);
1871        } else if (name.equals("notAvailable")) {
1872          this.getNotAvailable().add((PractitionerRoleNotAvailableComponent) value);
1873        } else if (name.equals("availabilityExceptions")) {
1874          this.availabilityExceptions = castToString(value); // StringType
1875        } else if (name.equals("endpoint")) {
1876          this.getEndpoint().add(castToReference(value));
1877        } else
1878          return super.setProperty(name, value);
1879        return value;
1880      }
1881
1882      @Override
1883      public Base makeProperty(int hash, String name) throws FHIRException {
1884        switch (hash) {
1885        case -1618432855:  return addIdentifier(); 
1886        case -1422950650:  return getActiveElement();
1887        case -991726143:  return getPeriod(); 
1888        case 574573338:  return getPractitioner(); 
1889        case 1178922291:  return getOrganization(); 
1890        case 3059181:  return addCode(); 
1891        case -1694759682:  return addSpecialty(); 
1892        case 1901043637:  return addLocation(); 
1893        case 1289661064:  return addHealthcareService(); 
1894        case -1429363305:  return addTelecom(); 
1895        case 1873069366:  return addAvailableTime(); 
1896        case -629572298:  return addNotAvailable(); 
1897        case -1149143617:  return getAvailabilityExceptionsElement();
1898        case 1741102485:  return addEndpoint(); 
1899        default: return super.makeProperty(hash, name);
1900        }
1901
1902      }
1903
1904      @Override
1905      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1906        switch (hash) {
1907        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1908        case -1422950650: /*active*/ return new String[] {"boolean"};
1909        case -991726143: /*period*/ return new String[] {"Period"};
1910        case 574573338: /*practitioner*/ return new String[] {"Reference"};
1911        case 1178922291: /*organization*/ return new String[] {"Reference"};
1912        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
1913        case -1694759682: /*specialty*/ return new String[] {"CodeableConcept"};
1914        case 1901043637: /*location*/ return new String[] {"Reference"};
1915        case 1289661064: /*healthcareService*/ return new String[] {"Reference"};
1916        case -1429363305: /*telecom*/ return new String[] {"ContactPoint"};
1917        case 1873069366: /*availableTime*/ return new String[] {};
1918        case -629572298: /*notAvailable*/ return new String[] {};
1919        case -1149143617: /*availabilityExceptions*/ return new String[] {"string"};
1920        case 1741102485: /*endpoint*/ return new String[] {"Reference"};
1921        default: return super.getTypesForProperty(hash, name);
1922        }
1923
1924      }
1925
1926      @Override
1927      public Base addChild(String name) throws FHIRException {
1928        if (name.equals("identifier")) {
1929          return addIdentifier();
1930        }
1931        else if (name.equals("active")) {
1932          throw new FHIRException("Cannot call addChild on a primitive type PractitionerRole.active");
1933        }
1934        else if (name.equals("period")) {
1935          this.period = new Period();
1936          return this.period;
1937        }
1938        else if (name.equals("practitioner")) {
1939          this.practitioner = new Reference();
1940          return this.practitioner;
1941        }
1942        else if (name.equals("organization")) {
1943          this.organization = new Reference();
1944          return this.organization;
1945        }
1946        else if (name.equals("code")) {
1947          return addCode();
1948        }
1949        else if (name.equals("specialty")) {
1950          return addSpecialty();
1951        }
1952        else if (name.equals("location")) {
1953          return addLocation();
1954        }
1955        else if (name.equals("healthcareService")) {
1956          return addHealthcareService();
1957        }
1958        else if (name.equals("telecom")) {
1959          return addTelecom();
1960        }
1961        else if (name.equals("availableTime")) {
1962          return addAvailableTime();
1963        }
1964        else if (name.equals("notAvailable")) {
1965          return addNotAvailable();
1966        }
1967        else if (name.equals("availabilityExceptions")) {
1968          throw new FHIRException("Cannot call addChild on a primitive type PractitionerRole.availabilityExceptions");
1969        }
1970        else if (name.equals("endpoint")) {
1971          return addEndpoint();
1972        }
1973        else
1974          return super.addChild(name);
1975      }
1976
1977  public String fhirType() {
1978    return "PractitionerRole";
1979
1980  }
1981
1982      public PractitionerRole copy() {
1983        PractitionerRole dst = new PractitionerRole();
1984        copyValues(dst);
1985        if (identifier != null) {
1986          dst.identifier = new ArrayList<Identifier>();
1987          for (Identifier i : identifier)
1988            dst.identifier.add(i.copy());
1989        };
1990        dst.active = active == null ? null : active.copy();
1991        dst.period = period == null ? null : period.copy();
1992        dst.practitioner = practitioner == null ? null : practitioner.copy();
1993        dst.organization = organization == null ? null : organization.copy();
1994        if (code != null) {
1995          dst.code = new ArrayList<CodeableConcept>();
1996          for (CodeableConcept i : code)
1997            dst.code.add(i.copy());
1998        };
1999        if (specialty != null) {
2000          dst.specialty = new ArrayList<CodeableConcept>();
2001          for (CodeableConcept i : specialty)
2002            dst.specialty.add(i.copy());
2003        };
2004        if (location != null) {
2005          dst.location = new ArrayList<Reference>();
2006          for (Reference i : location)
2007            dst.location.add(i.copy());
2008        };
2009        if (healthcareService != null) {
2010          dst.healthcareService = new ArrayList<Reference>();
2011          for (Reference i : healthcareService)
2012            dst.healthcareService.add(i.copy());
2013        };
2014        if (telecom != null) {
2015          dst.telecom = new ArrayList<ContactPoint>();
2016          for (ContactPoint i : telecom)
2017            dst.telecom.add(i.copy());
2018        };
2019        if (availableTime != null) {
2020          dst.availableTime = new ArrayList<PractitionerRoleAvailableTimeComponent>();
2021          for (PractitionerRoleAvailableTimeComponent i : availableTime)
2022            dst.availableTime.add(i.copy());
2023        };
2024        if (notAvailable != null) {
2025          dst.notAvailable = new ArrayList<PractitionerRoleNotAvailableComponent>();
2026          for (PractitionerRoleNotAvailableComponent i : notAvailable)
2027            dst.notAvailable.add(i.copy());
2028        };
2029        dst.availabilityExceptions = availabilityExceptions == null ? null : availabilityExceptions.copy();
2030        if (endpoint != null) {
2031          dst.endpoint = new ArrayList<Reference>();
2032          for (Reference i : endpoint)
2033            dst.endpoint.add(i.copy());
2034        };
2035        return dst;
2036      }
2037
2038      protected PractitionerRole typedCopy() {
2039        return copy();
2040      }
2041
2042      @Override
2043      public boolean equalsDeep(Base other_) {
2044        if (!super.equalsDeep(other_))
2045          return false;
2046        if (!(other_ instanceof PractitionerRole))
2047          return false;
2048        PractitionerRole o = (PractitionerRole) other_;
2049        return compareDeep(identifier, o.identifier, true) && compareDeep(active, o.active, true) && compareDeep(period, o.period, true)
2050           && compareDeep(practitioner, o.practitioner, true) && compareDeep(organization, o.organization, true)
2051           && compareDeep(code, o.code, true) && compareDeep(specialty, o.specialty, true) && compareDeep(location, o.location, true)
2052           && compareDeep(healthcareService, o.healthcareService, true) && compareDeep(telecom, o.telecom, true)
2053           && compareDeep(availableTime, o.availableTime, true) && compareDeep(notAvailable, o.notAvailable, true)
2054           && compareDeep(availabilityExceptions, o.availabilityExceptions, true) && compareDeep(endpoint, o.endpoint, true)
2055          ;
2056      }
2057
2058      @Override
2059      public boolean equalsShallow(Base other_) {
2060        if (!super.equalsShallow(other_))
2061          return false;
2062        if (!(other_ instanceof PractitionerRole))
2063          return false;
2064        PractitionerRole o = (PractitionerRole) other_;
2065        return compareValues(active, o.active, true) && compareValues(availabilityExceptions, o.availabilityExceptions, true)
2066          ;
2067      }
2068
2069      public boolean isEmpty() {
2070        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, active, period
2071          , practitioner, organization, code, specialty, location, healthcareService, telecom
2072          , availableTime, notAvailable, availabilityExceptions, endpoint);
2073      }
2074
2075  @Override
2076  public ResourceType getResourceType() {
2077    return ResourceType.PractitionerRole;
2078   }
2079
2080 /**
2081   * Search parameter: <b>date</b>
2082   * <p>
2083   * Description: <b>The period during which the practitioner is authorized to perform in these role(s)</b><br>
2084   * Type: <b>date</b><br>
2085   * Path: <b>PractitionerRole.period</b><br>
2086   * </p>
2087   */
2088  @SearchParamDefinition(name="date", path="PractitionerRole.period", description="The period during which the practitioner is authorized to perform in these role(s)", type="date" )
2089  public static final String SP_DATE = "date";
2090 /**
2091   * <b>Fluent Client</b> search parameter constant for <b>date</b>
2092   * <p>
2093   * Description: <b>The period during which the practitioner is authorized to perform in these role(s)</b><br>
2094   * Type: <b>date</b><br>
2095   * Path: <b>PractitionerRole.period</b><br>
2096   * </p>
2097   */
2098  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
2099
2100 /**
2101   * Search parameter: <b>identifier</b>
2102   * <p>
2103   * Description: <b>A practitioner's Identifier</b><br>
2104   * Type: <b>token</b><br>
2105   * Path: <b>PractitionerRole.identifier</b><br>
2106   * </p>
2107   */
2108  @SearchParamDefinition(name="identifier", path="PractitionerRole.identifier", description="A practitioner's Identifier", type="token" )
2109  public static final String SP_IDENTIFIER = "identifier";
2110 /**
2111   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2112   * <p>
2113   * Description: <b>A practitioner's Identifier</b><br>
2114   * Type: <b>token</b><br>
2115   * Path: <b>PractitionerRole.identifier</b><br>
2116   * </p>
2117   */
2118  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2119
2120 /**
2121   * Search parameter: <b>specialty</b>
2122   * <p>
2123   * Description: <b>The practitioner has this specialty at an organization</b><br>
2124   * Type: <b>token</b><br>
2125   * Path: <b>PractitionerRole.specialty</b><br>
2126   * </p>
2127   */
2128  @SearchParamDefinition(name="specialty", path="PractitionerRole.specialty", description="The practitioner has this specialty at an organization", type="token" )
2129  public static final String SP_SPECIALTY = "specialty";
2130 /**
2131   * <b>Fluent Client</b> search parameter constant for <b>specialty</b>
2132   * <p>
2133   * Description: <b>The practitioner has this specialty at an organization</b><br>
2134   * Type: <b>token</b><br>
2135   * Path: <b>PractitionerRole.specialty</b><br>
2136   * </p>
2137   */
2138  public static final ca.uhn.fhir.rest.gclient.TokenClientParam SPECIALTY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SPECIALTY);
2139
2140 /**
2141   * Search parameter: <b>role</b>
2142   * <p>
2143   * Description: <b>The practitioner can perform this role at for the organization</b><br>
2144   * Type: <b>token</b><br>
2145   * Path: <b>PractitionerRole.code</b><br>
2146   * </p>
2147   */
2148  @SearchParamDefinition(name="role", path="PractitionerRole.code", description="The practitioner can perform this role at for the organization", type="token" )
2149  public static final String SP_ROLE = "role";
2150 /**
2151   * <b>Fluent Client</b> search parameter constant for <b>role</b>
2152   * <p>
2153   * Description: <b>The practitioner can perform this role at for the organization</b><br>
2154   * Type: <b>token</b><br>
2155   * Path: <b>PractitionerRole.code</b><br>
2156   * </p>
2157   */
2158  public static final ca.uhn.fhir.rest.gclient.TokenClientParam ROLE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ROLE);
2159
2160 /**
2161   * Search parameter: <b>practitioner</b>
2162   * <p>
2163   * Description: <b>Practitioner that is able to provide the defined services for the organation</b><br>
2164   * Type: <b>reference</b><br>
2165   * Path: <b>PractitionerRole.practitioner</b><br>
2166   * </p>
2167   */
2168  @SearchParamDefinition(name="practitioner", path="PractitionerRole.practitioner", description="Practitioner that is able to provide the defined services for the organation", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Practitioner.class } )
2169  public static final String SP_PRACTITIONER = "practitioner";
2170 /**
2171   * <b>Fluent Client</b> search parameter constant for <b>practitioner</b>
2172   * <p>
2173   * Description: <b>Practitioner that is able to provide the defined services for the organation</b><br>
2174   * Type: <b>reference</b><br>
2175   * Path: <b>PractitionerRole.practitioner</b><br>
2176   * </p>
2177   */
2178  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PRACTITIONER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PRACTITIONER);
2179
2180/**
2181   * Constant for fluent queries to be used to add include statements. Specifies
2182   * the path value of "<b>PractitionerRole:practitioner</b>".
2183   */
2184  public static final ca.uhn.fhir.model.api.Include INCLUDE_PRACTITIONER = new ca.uhn.fhir.model.api.Include("PractitionerRole:practitioner").toLocked();
2185
2186 /**
2187   * Search parameter: <b>active</b>
2188   * <p>
2189   * Description: <b>Whether this practitioner's record is in active use</b><br>
2190   * Type: <b>token</b><br>
2191   * Path: <b>PractitionerRole.active</b><br>
2192   * </p>
2193   */
2194  @SearchParamDefinition(name="active", path="PractitionerRole.active", description="Whether this practitioner's record is in active use", type="token" )
2195  public static final String SP_ACTIVE = "active";
2196 /**
2197   * <b>Fluent Client</b> search parameter constant for <b>active</b>
2198   * <p>
2199   * Description: <b>Whether this practitioner's record is in active use</b><br>
2200   * Type: <b>token</b><br>
2201   * Path: <b>PractitionerRole.active</b><br>
2202   * </p>
2203   */
2204  public static final ca.uhn.fhir.rest.gclient.TokenClientParam ACTIVE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ACTIVE);
2205
2206 /**
2207   * Search parameter: <b>endpoint</b>
2208   * <p>
2209   * Description: <b>Technical endpoints providing access to services operated for the practitioner with this role</b><br>
2210   * Type: <b>reference</b><br>
2211   * Path: <b>PractitionerRole.endpoint</b><br>
2212   * </p>
2213   */
2214  @SearchParamDefinition(name="endpoint", path="PractitionerRole.endpoint", description="Technical endpoints providing access to services operated for the practitioner with this role", type="reference", target={Endpoint.class } )
2215  public static final String SP_ENDPOINT = "endpoint";
2216 /**
2217   * <b>Fluent Client</b> search parameter constant for <b>endpoint</b>
2218   * <p>
2219   * Description: <b>Technical endpoints providing access to services operated for the practitioner with this role</b><br>
2220   * Type: <b>reference</b><br>
2221   * Path: <b>PractitionerRole.endpoint</b><br>
2222   * </p>
2223   */
2224  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENDPOINT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENDPOINT);
2225
2226/**
2227   * Constant for fluent queries to be used to add include statements. Specifies
2228   * the path value of "<b>PractitionerRole:endpoint</b>".
2229   */
2230  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENDPOINT = new ca.uhn.fhir.model.api.Include("PractitionerRole:endpoint").toLocked();
2231
2232 /**
2233   * Search parameter: <b>phone</b>
2234   * <p>
2235   * Description: <b>A value in a phone contact</b><br>
2236   * Type: <b>token</b><br>
2237   * Path: <b>PractitionerRole.telecom(system=phone)</b><br>
2238   * </p>
2239   */
2240  @SearchParamDefinition(name="phone", path="PractitionerRole.telecom.where(system='phone')", description="A value in a phone contact", type="token" )
2241  public static final String SP_PHONE = "phone";
2242 /**
2243   * <b>Fluent Client</b> search parameter constant for <b>phone</b>
2244   * <p>
2245   * Description: <b>A value in a phone contact</b><br>
2246   * Type: <b>token</b><br>
2247   * Path: <b>PractitionerRole.telecom(system=phone)</b><br>
2248   * </p>
2249   */
2250  public static final ca.uhn.fhir.rest.gclient.TokenClientParam PHONE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PHONE);
2251
2252 /**
2253   * Search parameter: <b>service</b>
2254   * <p>
2255   * Description: <b>The list of healthcare services that this worker provides for this role's Organization/Location(s)</b><br>
2256   * Type: <b>reference</b><br>
2257   * Path: <b>PractitionerRole.healthcareService</b><br>
2258   * </p>
2259   */
2260  @SearchParamDefinition(name="service", path="PractitionerRole.healthcareService", description="The list of healthcare services that this worker provides for this role's Organization/Location(s)", type="reference", target={HealthcareService.class } )
2261  public static final String SP_SERVICE = "service";
2262 /**
2263   * <b>Fluent Client</b> search parameter constant for <b>service</b>
2264   * <p>
2265   * Description: <b>The list of healthcare services that this worker provides for this role's Organization/Location(s)</b><br>
2266   * Type: <b>reference</b><br>
2267   * Path: <b>PractitionerRole.healthcareService</b><br>
2268   * </p>
2269   */
2270  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SERVICE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SERVICE);
2271
2272/**
2273   * Constant for fluent queries to be used to add include statements. Specifies
2274   * the path value of "<b>PractitionerRole:service</b>".
2275   */
2276  public static final ca.uhn.fhir.model.api.Include INCLUDE_SERVICE = new ca.uhn.fhir.model.api.Include("PractitionerRole:service").toLocked();
2277
2278 /**
2279   * Search parameter: <b>organization</b>
2280   * <p>
2281   * Description: <b>The identity of the organization the practitioner represents / acts on behalf of</b><br>
2282   * Type: <b>reference</b><br>
2283   * Path: <b>PractitionerRole.organization</b><br>
2284   * </p>
2285   */
2286  @SearchParamDefinition(name="organization", path="PractitionerRole.organization", description="The identity of the organization the practitioner represents / acts on behalf of", type="reference", target={Organization.class } )
2287  public static final String SP_ORGANIZATION = "organization";
2288 /**
2289   * <b>Fluent Client</b> search parameter constant for <b>organization</b>
2290   * <p>
2291   * Description: <b>The identity of the organization the practitioner represents / acts on behalf of</b><br>
2292   * Type: <b>reference</b><br>
2293   * Path: <b>PractitionerRole.organization</b><br>
2294   * </p>
2295   */
2296  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION);
2297
2298/**
2299   * Constant for fluent queries to be used to add include statements. Specifies
2300   * the path value of "<b>PractitionerRole:organization</b>".
2301   */
2302  public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("PractitionerRole:organization").toLocked();
2303
2304 /**
2305   * Search parameter: <b>telecom</b>
2306   * <p>
2307   * Description: <b>The value in any kind of contact</b><br>
2308   * Type: <b>token</b><br>
2309   * Path: <b>PractitionerRole.telecom</b><br>
2310   * </p>
2311   */
2312  @SearchParamDefinition(name="telecom", path="PractitionerRole.telecom", description="The value in any kind of contact", type="token" )
2313  public static final String SP_TELECOM = "telecom";
2314 /**
2315   * <b>Fluent Client</b> search parameter constant for <b>telecom</b>
2316   * <p>
2317   * Description: <b>The value in any kind of contact</b><br>
2318   * Type: <b>token</b><br>
2319   * Path: <b>PractitionerRole.telecom</b><br>
2320   * </p>
2321   */
2322  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TELECOM = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TELECOM);
2323
2324 /**
2325   * Search parameter: <b>location</b>
2326   * <p>
2327   * Description: <b>One of the locations at which this practitioner provides care</b><br>
2328   * Type: <b>reference</b><br>
2329   * Path: <b>PractitionerRole.location</b><br>
2330   * </p>
2331   */
2332  @SearchParamDefinition(name="location", path="PractitionerRole.location", description="One of the locations at which this practitioner provides care", type="reference", target={Location.class } )
2333  public static final String SP_LOCATION = "location";
2334 /**
2335   * <b>Fluent Client</b> search parameter constant for <b>location</b>
2336   * <p>
2337   * Description: <b>One of the locations at which this practitioner provides care</b><br>
2338   * Type: <b>reference</b><br>
2339   * Path: <b>PractitionerRole.location</b><br>
2340   * </p>
2341   */
2342  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam LOCATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_LOCATION);
2343
2344/**
2345   * Constant for fluent queries to be used to add include statements. Specifies
2346   * the path value of "<b>PractitionerRole:location</b>".
2347   */
2348  public static final ca.uhn.fhir.model.api.Include INCLUDE_LOCATION = new ca.uhn.fhir.model.api.Include("PractitionerRole:location").toLocked();
2349
2350 /**
2351   * Search parameter: <b>email</b>
2352   * <p>
2353   * Description: <b>A value in an email contact</b><br>
2354   * Type: <b>token</b><br>
2355   * Path: <b>PractitionerRole.telecom(system=email)</b><br>
2356   * </p>
2357   */
2358  @SearchParamDefinition(name="email", path="PractitionerRole.telecom.where(system='email')", description="A value in an email contact", type="token" )
2359  public static final String SP_EMAIL = "email";
2360 /**
2361   * <b>Fluent Client</b> search parameter constant for <b>email</b>
2362   * <p>
2363   * Description: <b>A value in an email contact</b><br>
2364   * Type: <b>token</b><br>
2365   * Path: <b>PractitionerRole.telecom(system=email)</b><br>
2366   * </p>
2367   */
2368  public static final ca.uhn.fhir.rest.gclient.TokenClientParam EMAIL = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_EMAIL);
2369
2370
2371}
2372