001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.r5.model.Enumerations.*;
038import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
039import org.hl7.fhir.exceptions.FHIRException;
040import org.hl7.fhir.instance.model.api.ICompositeType;
041import ca.uhn.fhir.model.api.annotation.ResourceDef;
042import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
043import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
044import ca.uhn.fhir.model.api.annotation.Child;
045import ca.uhn.fhir.model.api.annotation.ChildOrder;
046import ca.uhn.fhir.model.api.annotation.Description;
047import ca.uhn.fhir.model.api.annotation.Block;
048
049/**
050 * A specific set of Roles/Locations/specialties/services that a practitioner may perform, or has performed at an organization during a period of time.
051 */
052@ResourceDef(name="PractitionerRole", profile="http://hl7.org/fhir/StructureDefinition/PractitionerRole")
053public class PractitionerRole extends DomainResource {
054
055    /**
056     * Business Identifiers that are specific to a role/location.
057     */
058    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
059    @Description(shortDefinition="Identifiers for a role/location", formalDefinition="Business Identifiers that are specific to a role/location." )
060    protected List<Identifier> identifier;
061
062    /**
063     *  Whether this practitioner role record is in active use. Some systems may use this property to mark non-active practitioners, such as those that are not currently employed.
064     */
065    @Child(name = "active", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=true)
066    @Description(shortDefinition="Whether this practitioner role record is in active use", formalDefinition=" Whether this practitioner role record is in active use. Some systems may use this property to mark non-active practitioners, such as those that are not currently employed." )
067    protected BooleanType active;
068
069    /**
070     * The period during which the person is authorized to act as a practitioner in these role(s) for the organization.
071     */
072    @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=true)
073    @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." )
074    protected Period period;
075
076    /**
077     * Practitioner that is able to provide the defined services for the organization.
078     */
079    @Child(name = "practitioner", type = {Practitioner.class}, order=3, min=0, max=1, modifier=false, summary=true)
080    @Description(shortDefinition="Practitioner that provides services for the organization", formalDefinition="Practitioner that is able to provide the defined services for the organization." )
081    protected Reference practitioner;
082
083    /**
084     * The organization where the Practitioner performs the roles associated.
085     */
086    @Child(name = "organization", type = {Organization.class}, order=4, min=0, max=1, modifier=false, summary=true)
087    @Description(shortDefinition="Organization where the roles are available", formalDefinition="The organization where the Practitioner performs the roles associated." )
088    protected Reference organization;
089
090    /**
091     * Roles which this practitioner is authorized to perform for the organization.
092     */
093    @Child(name = "code", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
094    @Description(shortDefinition="Roles which this practitioner may perform", formalDefinition="Roles which this practitioner is authorized to perform for the organization." )
095    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/practitioner-role")
096    protected List<CodeableConcept> code;
097
098    /**
099     * The specialty of a practitioner that describes the functional role they are practicing at a given organization or location.
100     */
101    @Child(name = "specialty", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
102    @Description(shortDefinition="Specific specialty of the practitioner", formalDefinition="The specialty of a practitioner that describes the functional role they are practicing at a given organization or location." )
103    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/c80-practice-codes")
104    protected List<CodeableConcept> specialty;
105
106    /**
107     * The location(s) at which this practitioner provides care.
108     */
109    @Child(name = "location", type = {Location.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
110    @Description(shortDefinition="Location(s) where the practitioner provides care", formalDefinition="The location(s) at which this practitioner provides care." )
111    protected List<Reference> location;
112
113    /**
114     * The list of healthcare services that this worker provides for this role's Organization/Location(s).
115     */
116    @Child(name = "healthcareService", type = {HealthcareService.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
117    @Description(shortDefinition="Healthcare services provided for this role's Organization/Location(s)", formalDefinition="The list of healthcare services that this worker provides for this role's Organization/Location(s)." )
118    protected List<Reference> healthcareService;
119
120    /**
121     * The contact details of communication devices available relevant to the specific PractitionerRole. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites.
122     */
123    @Child(name = "contact", type = {ExtendedContactDetail.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
124    @Description(shortDefinition="Official contact details relating to this PractitionerRole", formalDefinition="The contact details of communication devices available relevant to the specific PractitionerRole. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites." )
125    protected List<ExtendedContactDetail> contact;
126
127    /**
128     * Collection of characteristics (attributes).
129     */
130    @Child(name = "characteristic", type = {CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
131    @Description(shortDefinition="Collection of characteristics (attributes)", formalDefinition="Collection of characteristics (attributes)." )
132    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-mode")
133    protected List<CodeableConcept> characteristic;
134
135    /**
136     * A language the practitioner can use in patient communication. The practitioner may know several languages (listed in practitioner.communication), however these are the languages that could be advertised in a directory for a patient to search.
137     */
138    @Child(name = "communication", type = {CodeableConcept.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
139    @Description(shortDefinition="A language the practitioner (in this role) can use in patient communication", formalDefinition="A language the practitioner can use in patient communication. The practitioner may know several languages (listed in practitioner.communication), however these are the languages that could be advertised in a directory for a patient to search." )
140    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/all-languages")
141    protected List<CodeableConcept> communication;
142
143    /**
144     * A collection of times the practitioner is available or performing this role at the location and/or healthcareservice.
145     */
146    @Child(name = "availability", type = {Availability.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
147    @Description(shortDefinition="Times the Practitioner is available at this location and/or healthcare service (including exceptions)", formalDefinition="A collection of times the practitioner is available or performing this role at the location and/or healthcareservice." )
148    protected List<Availability> availability;
149
150    /**
151     *  Technical endpoints providing access to services operated for the practitioner with this role. Commonly used for locating scheduling services, or identifying where to send referrals electronically.
152     */
153    @Child(name = "endpoint", type = {Endpoint.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
154    @Description(shortDefinition="Endpoints for interacting with the practitioner in this role", formalDefinition=" Technical endpoints providing access to services operated for the practitioner with this role. Commonly used for locating scheduling services, or identifying where to send referrals electronically." )
155    protected List<Reference> endpoint;
156
157    private static final long serialVersionUID = 1286634270L;
158
159  /**
160   * Constructor
161   */
162    public PractitionerRole() {
163      super();
164    }
165
166    /**
167     * @return {@link #identifier} (Business Identifiers that are specific to a role/location.)
168     */
169    public List<Identifier> getIdentifier() { 
170      if (this.identifier == null)
171        this.identifier = new ArrayList<Identifier>();
172      return this.identifier;
173    }
174
175    /**
176     * @return Returns a reference to <code>this</code> for easy method chaining
177     */
178    public PractitionerRole setIdentifier(List<Identifier> theIdentifier) { 
179      this.identifier = theIdentifier;
180      return this;
181    }
182
183    public boolean hasIdentifier() { 
184      if (this.identifier == null)
185        return false;
186      for (Identifier item : this.identifier)
187        if (!item.isEmpty())
188          return true;
189      return false;
190    }
191
192    public Identifier addIdentifier() { //3
193      Identifier t = new Identifier();
194      if (this.identifier == null)
195        this.identifier = new ArrayList<Identifier>();
196      this.identifier.add(t);
197      return t;
198    }
199
200    public PractitionerRole addIdentifier(Identifier t) { //3
201      if (t == null)
202        return this;
203      if (this.identifier == null)
204        this.identifier = new ArrayList<Identifier>();
205      this.identifier.add(t);
206      return this;
207    }
208
209    /**
210     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
211     */
212    public Identifier getIdentifierFirstRep() { 
213      if (getIdentifier().isEmpty()) {
214        addIdentifier();
215      }
216      return getIdentifier().get(0);
217    }
218
219    /**
220     * @return {@link #active} ( Whether this practitioner role record is in active use. Some systems may use this property to mark non-active practitioners, such as those that are not currently employed.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value
221     */
222    public BooleanType getActiveElement() { 
223      if (this.active == null)
224        if (Configuration.errorOnAutoCreate())
225          throw new Error("Attempt to auto-create PractitionerRole.active");
226        else if (Configuration.doAutoCreate())
227          this.active = new BooleanType(); // bb
228      return this.active;
229    }
230
231    public boolean hasActiveElement() { 
232      return this.active != null && !this.active.isEmpty();
233    }
234
235    public boolean hasActive() { 
236      return this.active != null && !this.active.isEmpty();
237    }
238
239    /**
240     * @param value {@link #active} ( Whether this practitioner role record is in active use. Some systems may use this property to mark non-active practitioners, such as those that are not currently employed.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value
241     */
242    public PractitionerRole setActiveElement(BooleanType value) { 
243      this.active = value;
244      return this;
245    }
246
247    /**
248     * @return  Whether this practitioner role record is in active use. Some systems may use this property to mark non-active practitioners, such as those that are not currently employed.
249     */
250    public boolean getActive() { 
251      return this.active == null || this.active.isEmpty() ? false : this.active.getValue();
252    }
253
254    /**
255     * @param value  Whether this practitioner role record is in active use. Some systems may use this property to mark non-active practitioners, such as those that are not currently employed.
256     */
257    public PractitionerRole setActive(boolean value) { 
258        if (this.active == null)
259          this.active = new BooleanType();
260        this.active.setValue(value);
261      return this;
262    }
263
264    /**
265     * @return {@link #period} (The period during which the person is authorized to act as a practitioner in these role(s) for the organization.)
266     */
267    public Period getPeriod() { 
268      if (this.period == null)
269        if (Configuration.errorOnAutoCreate())
270          throw new Error("Attempt to auto-create PractitionerRole.period");
271        else if (Configuration.doAutoCreate())
272          this.period = new Period(); // cc
273      return this.period;
274    }
275
276    public boolean hasPeriod() { 
277      return this.period != null && !this.period.isEmpty();
278    }
279
280    /**
281     * @param value {@link #period} (The period during which the person is authorized to act as a practitioner in these role(s) for the organization.)
282     */
283    public PractitionerRole setPeriod(Period value) { 
284      this.period = value;
285      return this;
286    }
287
288    /**
289     * @return {@link #practitioner} (Practitioner that is able to provide the defined services for the organization.)
290     */
291    public Reference getPractitioner() { 
292      if (this.practitioner == null)
293        if (Configuration.errorOnAutoCreate())
294          throw new Error("Attempt to auto-create PractitionerRole.practitioner");
295        else if (Configuration.doAutoCreate())
296          this.practitioner = new Reference(); // cc
297      return this.practitioner;
298    }
299
300    public boolean hasPractitioner() { 
301      return this.practitioner != null && !this.practitioner.isEmpty();
302    }
303
304    /**
305     * @param value {@link #practitioner} (Practitioner that is able to provide the defined services for the organization.)
306     */
307    public PractitionerRole setPractitioner(Reference value) { 
308      this.practitioner = value;
309      return this;
310    }
311
312    /**
313     * @return {@link #organization} (The organization where the Practitioner performs the roles associated.)
314     */
315    public Reference getOrganization() { 
316      if (this.organization == null)
317        if (Configuration.errorOnAutoCreate())
318          throw new Error("Attempt to auto-create PractitionerRole.organization");
319        else if (Configuration.doAutoCreate())
320          this.organization = new Reference(); // cc
321      return this.organization;
322    }
323
324    public boolean hasOrganization() { 
325      return this.organization != null && !this.organization.isEmpty();
326    }
327
328    /**
329     * @param value {@link #organization} (The organization where the Practitioner performs the roles associated.)
330     */
331    public PractitionerRole setOrganization(Reference value) { 
332      this.organization = value;
333      return this;
334    }
335
336    /**
337     * @return {@link #code} (Roles which this practitioner is authorized to perform for the organization.)
338     */
339    public List<CodeableConcept> getCode() { 
340      if (this.code == null)
341        this.code = new ArrayList<CodeableConcept>();
342      return this.code;
343    }
344
345    /**
346     * @return Returns a reference to <code>this</code> for easy method chaining
347     */
348    public PractitionerRole setCode(List<CodeableConcept> theCode) { 
349      this.code = theCode;
350      return this;
351    }
352
353    public boolean hasCode() { 
354      if (this.code == null)
355        return false;
356      for (CodeableConcept item : this.code)
357        if (!item.isEmpty())
358          return true;
359      return false;
360    }
361
362    public CodeableConcept addCode() { //3
363      CodeableConcept t = new CodeableConcept();
364      if (this.code == null)
365        this.code = new ArrayList<CodeableConcept>();
366      this.code.add(t);
367      return t;
368    }
369
370    public PractitionerRole addCode(CodeableConcept t) { //3
371      if (t == null)
372        return this;
373      if (this.code == null)
374        this.code = new ArrayList<CodeableConcept>();
375      this.code.add(t);
376      return this;
377    }
378
379    /**
380     * @return The first repetition of repeating field {@link #code}, creating it if it does not already exist {3}
381     */
382    public CodeableConcept getCodeFirstRep() { 
383      if (getCode().isEmpty()) {
384        addCode();
385      }
386      return getCode().get(0);
387    }
388
389    /**
390     * @return {@link #specialty} (The specialty of a practitioner that describes the functional role they are practicing at a given organization or location.)
391     */
392    public List<CodeableConcept> getSpecialty() { 
393      if (this.specialty == null)
394        this.specialty = new ArrayList<CodeableConcept>();
395      return this.specialty;
396    }
397
398    /**
399     * @return Returns a reference to <code>this</code> for easy method chaining
400     */
401    public PractitionerRole setSpecialty(List<CodeableConcept> theSpecialty) { 
402      this.specialty = theSpecialty;
403      return this;
404    }
405
406    public boolean hasSpecialty() { 
407      if (this.specialty == null)
408        return false;
409      for (CodeableConcept item : this.specialty)
410        if (!item.isEmpty())
411          return true;
412      return false;
413    }
414
415    public CodeableConcept addSpecialty() { //3
416      CodeableConcept t = new CodeableConcept();
417      if (this.specialty == null)
418        this.specialty = new ArrayList<CodeableConcept>();
419      this.specialty.add(t);
420      return t;
421    }
422
423    public PractitionerRole addSpecialty(CodeableConcept t) { //3
424      if (t == null)
425        return this;
426      if (this.specialty == null)
427        this.specialty = new ArrayList<CodeableConcept>();
428      this.specialty.add(t);
429      return this;
430    }
431
432    /**
433     * @return The first repetition of repeating field {@link #specialty}, creating it if it does not already exist {3}
434     */
435    public CodeableConcept getSpecialtyFirstRep() { 
436      if (getSpecialty().isEmpty()) {
437        addSpecialty();
438      }
439      return getSpecialty().get(0);
440    }
441
442    /**
443     * @return {@link #location} (The location(s) at which this practitioner provides care.)
444     */
445    public List<Reference> getLocation() { 
446      if (this.location == null)
447        this.location = new ArrayList<Reference>();
448      return this.location;
449    }
450
451    /**
452     * @return Returns a reference to <code>this</code> for easy method chaining
453     */
454    public PractitionerRole setLocation(List<Reference> theLocation) { 
455      this.location = theLocation;
456      return this;
457    }
458
459    public boolean hasLocation() { 
460      if (this.location == null)
461        return false;
462      for (Reference item : this.location)
463        if (!item.isEmpty())
464          return true;
465      return false;
466    }
467
468    public Reference addLocation() { //3
469      Reference t = new Reference();
470      if (this.location == null)
471        this.location = new ArrayList<Reference>();
472      this.location.add(t);
473      return t;
474    }
475
476    public PractitionerRole addLocation(Reference t) { //3
477      if (t == null)
478        return this;
479      if (this.location == null)
480        this.location = new ArrayList<Reference>();
481      this.location.add(t);
482      return this;
483    }
484
485    /**
486     * @return The first repetition of repeating field {@link #location}, creating it if it does not already exist {3}
487     */
488    public Reference getLocationFirstRep() { 
489      if (getLocation().isEmpty()) {
490        addLocation();
491      }
492      return getLocation().get(0);
493    }
494
495    /**
496     * @return {@link #healthcareService} (The list of healthcare services that this worker provides for this role's Organization/Location(s).)
497     */
498    public List<Reference> getHealthcareService() { 
499      if (this.healthcareService == null)
500        this.healthcareService = new ArrayList<Reference>();
501      return this.healthcareService;
502    }
503
504    /**
505     * @return Returns a reference to <code>this</code> for easy method chaining
506     */
507    public PractitionerRole setHealthcareService(List<Reference> theHealthcareService) { 
508      this.healthcareService = theHealthcareService;
509      return this;
510    }
511
512    public boolean hasHealthcareService() { 
513      if (this.healthcareService == null)
514        return false;
515      for (Reference item : this.healthcareService)
516        if (!item.isEmpty())
517          return true;
518      return false;
519    }
520
521    public Reference addHealthcareService() { //3
522      Reference t = new Reference();
523      if (this.healthcareService == null)
524        this.healthcareService = new ArrayList<Reference>();
525      this.healthcareService.add(t);
526      return t;
527    }
528
529    public PractitionerRole addHealthcareService(Reference t) { //3
530      if (t == null)
531        return this;
532      if (this.healthcareService == null)
533        this.healthcareService = new ArrayList<Reference>();
534      this.healthcareService.add(t);
535      return this;
536    }
537
538    /**
539     * @return The first repetition of repeating field {@link #healthcareService}, creating it if it does not already exist {3}
540     */
541    public Reference getHealthcareServiceFirstRep() { 
542      if (getHealthcareService().isEmpty()) {
543        addHealthcareService();
544      }
545      return getHealthcareService().get(0);
546    }
547
548    /**
549     * @return {@link #contact} (The contact details of communication devices available relevant to the specific PractitionerRole. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites.)
550     */
551    public List<ExtendedContactDetail> getContact() { 
552      if (this.contact == null)
553        this.contact = new ArrayList<ExtendedContactDetail>();
554      return this.contact;
555    }
556
557    /**
558     * @return Returns a reference to <code>this</code> for easy method chaining
559     */
560    public PractitionerRole setContact(List<ExtendedContactDetail> theContact) { 
561      this.contact = theContact;
562      return this;
563    }
564
565    public boolean hasContact() { 
566      if (this.contact == null)
567        return false;
568      for (ExtendedContactDetail item : this.contact)
569        if (!item.isEmpty())
570          return true;
571      return false;
572    }
573
574    public ExtendedContactDetail addContact() { //3
575      ExtendedContactDetail t = new ExtendedContactDetail();
576      if (this.contact == null)
577        this.contact = new ArrayList<ExtendedContactDetail>();
578      this.contact.add(t);
579      return t;
580    }
581
582    public PractitionerRole addContact(ExtendedContactDetail t) { //3
583      if (t == null)
584        return this;
585      if (this.contact == null)
586        this.contact = new ArrayList<ExtendedContactDetail>();
587      this.contact.add(t);
588      return this;
589    }
590
591    /**
592     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist {3}
593     */
594    public ExtendedContactDetail getContactFirstRep() { 
595      if (getContact().isEmpty()) {
596        addContact();
597      }
598      return getContact().get(0);
599    }
600
601    /**
602     * @return {@link #characteristic} (Collection of characteristics (attributes).)
603     */
604    public List<CodeableConcept> getCharacteristic() { 
605      if (this.characteristic == null)
606        this.characteristic = new ArrayList<CodeableConcept>();
607      return this.characteristic;
608    }
609
610    /**
611     * @return Returns a reference to <code>this</code> for easy method chaining
612     */
613    public PractitionerRole setCharacteristic(List<CodeableConcept> theCharacteristic) { 
614      this.characteristic = theCharacteristic;
615      return this;
616    }
617
618    public boolean hasCharacteristic() { 
619      if (this.characteristic == null)
620        return false;
621      for (CodeableConcept item : this.characteristic)
622        if (!item.isEmpty())
623          return true;
624      return false;
625    }
626
627    public CodeableConcept addCharacteristic() { //3
628      CodeableConcept t = new CodeableConcept();
629      if (this.characteristic == null)
630        this.characteristic = new ArrayList<CodeableConcept>();
631      this.characteristic.add(t);
632      return t;
633    }
634
635    public PractitionerRole addCharacteristic(CodeableConcept t) { //3
636      if (t == null)
637        return this;
638      if (this.characteristic == null)
639        this.characteristic = new ArrayList<CodeableConcept>();
640      this.characteristic.add(t);
641      return this;
642    }
643
644    /**
645     * @return The first repetition of repeating field {@link #characteristic}, creating it if it does not already exist {3}
646     */
647    public CodeableConcept getCharacteristicFirstRep() { 
648      if (getCharacteristic().isEmpty()) {
649        addCharacteristic();
650      }
651      return getCharacteristic().get(0);
652    }
653
654    /**
655     * @return {@link #communication} (A language the practitioner can use in patient communication. The practitioner may know several languages (listed in practitioner.communication), however these are the languages that could be advertised in a directory for a patient to search.)
656     */
657    public List<CodeableConcept> getCommunication() { 
658      if (this.communication == null)
659        this.communication = new ArrayList<CodeableConcept>();
660      return this.communication;
661    }
662
663    /**
664     * @return Returns a reference to <code>this</code> for easy method chaining
665     */
666    public PractitionerRole setCommunication(List<CodeableConcept> theCommunication) { 
667      this.communication = theCommunication;
668      return this;
669    }
670
671    public boolean hasCommunication() { 
672      if (this.communication == null)
673        return false;
674      for (CodeableConcept item : this.communication)
675        if (!item.isEmpty())
676          return true;
677      return false;
678    }
679
680    public CodeableConcept addCommunication() { //3
681      CodeableConcept t = new CodeableConcept();
682      if (this.communication == null)
683        this.communication = new ArrayList<CodeableConcept>();
684      this.communication.add(t);
685      return t;
686    }
687
688    public PractitionerRole addCommunication(CodeableConcept t) { //3
689      if (t == null)
690        return this;
691      if (this.communication == null)
692        this.communication = new ArrayList<CodeableConcept>();
693      this.communication.add(t);
694      return this;
695    }
696
697    /**
698     * @return The first repetition of repeating field {@link #communication}, creating it if it does not already exist {3}
699     */
700    public CodeableConcept getCommunicationFirstRep() { 
701      if (getCommunication().isEmpty()) {
702        addCommunication();
703      }
704      return getCommunication().get(0);
705    }
706
707    /**
708     * @return {@link #availability} (A collection of times the practitioner is available or performing this role at the location and/or healthcareservice.)
709     */
710    public List<Availability> getAvailability() { 
711      if (this.availability == null)
712        this.availability = new ArrayList<Availability>();
713      return this.availability;
714    }
715
716    /**
717     * @return Returns a reference to <code>this</code> for easy method chaining
718     */
719    public PractitionerRole setAvailability(List<Availability> theAvailability) { 
720      this.availability = theAvailability;
721      return this;
722    }
723
724    public boolean hasAvailability() { 
725      if (this.availability == null)
726        return false;
727      for (Availability item : this.availability)
728        if (!item.isEmpty())
729          return true;
730      return false;
731    }
732
733    public Availability addAvailability() { //3
734      Availability t = new Availability();
735      if (this.availability == null)
736        this.availability = new ArrayList<Availability>();
737      this.availability.add(t);
738      return t;
739    }
740
741    public PractitionerRole addAvailability(Availability t) { //3
742      if (t == null)
743        return this;
744      if (this.availability == null)
745        this.availability = new ArrayList<Availability>();
746      this.availability.add(t);
747      return this;
748    }
749
750    /**
751     * @return The first repetition of repeating field {@link #availability}, creating it if it does not already exist {3}
752     */
753    public Availability getAvailabilityFirstRep() { 
754      if (getAvailability().isEmpty()) {
755        addAvailability();
756      }
757      return getAvailability().get(0);
758    }
759
760    /**
761     * @return {@link #endpoint} ( Technical endpoints providing access to services operated for the practitioner with this role. Commonly used for locating scheduling services, or identifying where to send referrals electronically.)
762     */
763    public List<Reference> getEndpoint() { 
764      if (this.endpoint == null)
765        this.endpoint = new ArrayList<Reference>();
766      return this.endpoint;
767    }
768
769    /**
770     * @return Returns a reference to <code>this</code> for easy method chaining
771     */
772    public PractitionerRole setEndpoint(List<Reference> theEndpoint) { 
773      this.endpoint = theEndpoint;
774      return this;
775    }
776
777    public boolean hasEndpoint() { 
778      if (this.endpoint == null)
779        return false;
780      for (Reference item : this.endpoint)
781        if (!item.isEmpty())
782          return true;
783      return false;
784    }
785
786    public Reference addEndpoint() { //3
787      Reference t = new Reference();
788      if (this.endpoint == null)
789        this.endpoint = new ArrayList<Reference>();
790      this.endpoint.add(t);
791      return t;
792    }
793
794    public PractitionerRole addEndpoint(Reference t) { //3
795      if (t == null)
796        return this;
797      if (this.endpoint == null)
798        this.endpoint = new ArrayList<Reference>();
799      this.endpoint.add(t);
800      return this;
801    }
802
803    /**
804     * @return The first repetition of repeating field {@link #endpoint}, creating it if it does not already exist {3}
805     */
806    public Reference getEndpointFirstRep() { 
807      if (getEndpoint().isEmpty()) {
808        addEndpoint();
809      }
810      return getEndpoint().get(0);
811    }
812
813      protected void listChildren(List<Property> children) {
814        super.listChildren(children);
815        children.add(new Property("identifier", "Identifier", "Business Identifiers that are specific to a role/location.", 0, java.lang.Integer.MAX_VALUE, identifier));
816        children.add(new Property("active", "boolean", " Whether this practitioner role record is in active use. Some systems may use this property to mark non-active practitioners, such as those that are not currently employed.", 0, 1, active));
817        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));
818        children.add(new Property("practitioner", "Reference(Practitioner)", "Practitioner that is able to provide the defined services for the organization.", 0, 1, practitioner));
819        children.add(new Property("organization", "Reference(Organization)", "The organization where the Practitioner performs the roles associated.", 0, 1, organization));
820        children.add(new Property("code", "CodeableConcept", "Roles which this practitioner is authorized to perform for the organization.", 0, java.lang.Integer.MAX_VALUE, code));
821        children.add(new Property("specialty", "CodeableConcept", "The specialty of a practitioner that describes the functional role they are practicing at a given organization or location.", 0, java.lang.Integer.MAX_VALUE, specialty));
822        children.add(new Property("location", "Reference(Location)", "The location(s) at which this practitioner provides care.", 0, java.lang.Integer.MAX_VALUE, location));
823        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));
824        children.add(new Property("contact", "ExtendedContactDetail", "The contact details of communication devices available relevant to the specific PractitionerRole. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites.", 0, java.lang.Integer.MAX_VALUE, contact));
825        children.add(new Property("characteristic", "CodeableConcept", "Collection of characteristics (attributes).", 0, java.lang.Integer.MAX_VALUE, characteristic));
826        children.add(new Property("communication", "CodeableConcept", "A language the practitioner can use in patient communication. The practitioner may know several languages (listed in practitioner.communication), however these are the languages that could be advertised in a directory for a patient to search.", 0, java.lang.Integer.MAX_VALUE, communication));
827        children.add(new Property("availability", "Availability", "A collection of times the practitioner is available or performing this role at the location and/or healthcareservice.", 0, java.lang.Integer.MAX_VALUE, availability));
828        children.add(new Property("endpoint", "Reference(Endpoint)", " Technical endpoints providing access to services operated for the practitioner with this role. Commonly used for locating scheduling services, or identifying where to send referrals electronically.", 0, java.lang.Integer.MAX_VALUE, endpoint));
829      }
830
831      @Override
832      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
833        switch (_hash) {
834        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Business Identifiers that are specific to a role/location.", 0, java.lang.Integer.MAX_VALUE, identifier);
835        case -1422950650: /*active*/  return new Property("active", "boolean", " Whether this practitioner role record is in active use. Some systems may use this property to mark non-active practitioners, such as those that are not currently employed.", 0, 1, active);
836        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);
837        case 574573338: /*practitioner*/  return new Property("practitioner", "Reference(Practitioner)", "Practitioner that is able to provide the defined services for the organization.", 0, 1, practitioner);
838        case 1178922291: /*organization*/  return new Property("organization", "Reference(Organization)", "The organization where the Practitioner performs the roles associated.", 0, 1, organization);
839        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);
840        case -1694759682: /*specialty*/  return new Property("specialty", "CodeableConcept", "The specialty of a practitioner that describes the functional role they are practicing at a given organization or location.", 0, java.lang.Integer.MAX_VALUE, specialty);
841        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);
842        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);
843        case 951526432: /*contact*/  return new Property("contact", "ExtendedContactDetail", "The contact details of communication devices available relevant to the specific PractitionerRole. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites.", 0, java.lang.Integer.MAX_VALUE, contact);
844        case 366313883: /*characteristic*/  return new Property("characteristic", "CodeableConcept", "Collection of characteristics (attributes).", 0, java.lang.Integer.MAX_VALUE, characteristic);
845        case -1035284522: /*communication*/  return new Property("communication", "CodeableConcept", "A language the practitioner can use in patient communication. The practitioner may know several languages (listed in practitioner.communication), however these are the languages that could be advertised in a directory for a patient to search.", 0, java.lang.Integer.MAX_VALUE, communication);
846        case 1997542747: /*availability*/  return new Property("availability", "Availability", "A collection of times the practitioner is available or performing this role at the location and/or healthcareservice.", 0, java.lang.Integer.MAX_VALUE, availability);
847        case 1741102485: /*endpoint*/  return new Property("endpoint", "Reference(Endpoint)", " Technical endpoints providing access to services operated for the practitioner with this role. Commonly used for locating scheduling services, or identifying where to send referrals electronically.", 0, java.lang.Integer.MAX_VALUE, endpoint);
848        default: return super.getNamedProperty(_hash, _name, _checkValid);
849        }
850
851      }
852
853      @Override
854      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
855        switch (hash) {
856        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
857        case -1422950650: /*active*/ return this.active == null ? new Base[0] : new Base[] {this.active}; // BooleanType
858        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
859        case 574573338: /*practitioner*/ return this.practitioner == null ? new Base[0] : new Base[] {this.practitioner}; // Reference
860        case 1178922291: /*organization*/ return this.organization == null ? new Base[0] : new Base[] {this.organization}; // Reference
861        case 3059181: /*code*/ return this.code == null ? new Base[0] : this.code.toArray(new Base[this.code.size()]); // CodeableConcept
862        case -1694759682: /*specialty*/ return this.specialty == null ? new Base[0] : this.specialty.toArray(new Base[this.specialty.size()]); // CodeableConcept
863        case 1901043637: /*location*/ return this.location == null ? new Base[0] : this.location.toArray(new Base[this.location.size()]); // Reference
864        case 1289661064: /*healthcareService*/ return this.healthcareService == null ? new Base[0] : this.healthcareService.toArray(new Base[this.healthcareService.size()]); // Reference
865        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ExtendedContactDetail
866        case 366313883: /*characteristic*/ return this.characteristic == null ? new Base[0] : this.characteristic.toArray(new Base[this.characteristic.size()]); // CodeableConcept
867        case -1035284522: /*communication*/ return this.communication == null ? new Base[0] : this.communication.toArray(new Base[this.communication.size()]); // CodeableConcept
868        case 1997542747: /*availability*/ return this.availability == null ? new Base[0] : this.availability.toArray(new Base[this.availability.size()]); // Availability
869        case 1741102485: /*endpoint*/ return this.endpoint == null ? new Base[0] : this.endpoint.toArray(new Base[this.endpoint.size()]); // Reference
870        default: return super.getProperty(hash, name, checkValid);
871        }
872
873      }
874
875      @Override
876      public Base setProperty(int hash, String name, Base value) throws FHIRException {
877        switch (hash) {
878        case -1618432855: // identifier
879          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
880          return value;
881        case -1422950650: // active
882          this.active = TypeConvertor.castToBoolean(value); // BooleanType
883          return value;
884        case -991726143: // period
885          this.period = TypeConvertor.castToPeriod(value); // Period
886          return value;
887        case 574573338: // practitioner
888          this.practitioner = TypeConvertor.castToReference(value); // Reference
889          return value;
890        case 1178922291: // organization
891          this.organization = TypeConvertor.castToReference(value); // Reference
892          return value;
893        case 3059181: // code
894          this.getCode().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
895          return value;
896        case -1694759682: // specialty
897          this.getSpecialty().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
898          return value;
899        case 1901043637: // location
900          this.getLocation().add(TypeConvertor.castToReference(value)); // Reference
901          return value;
902        case 1289661064: // healthcareService
903          this.getHealthcareService().add(TypeConvertor.castToReference(value)); // Reference
904          return value;
905        case 951526432: // contact
906          this.getContact().add(TypeConvertor.castToExtendedContactDetail(value)); // ExtendedContactDetail
907          return value;
908        case 366313883: // characteristic
909          this.getCharacteristic().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
910          return value;
911        case -1035284522: // communication
912          this.getCommunication().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
913          return value;
914        case 1997542747: // availability
915          this.getAvailability().add(TypeConvertor.castToAvailability(value)); // Availability
916          return value;
917        case 1741102485: // endpoint
918          this.getEndpoint().add(TypeConvertor.castToReference(value)); // Reference
919          return value;
920        default: return super.setProperty(hash, name, value);
921        }
922
923      }
924
925      @Override
926      public Base setProperty(String name, Base value) throws FHIRException {
927        if (name.equals("identifier")) {
928          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
929        } else if (name.equals("active")) {
930          this.active = TypeConvertor.castToBoolean(value); // BooleanType
931        } else if (name.equals("period")) {
932          this.period = TypeConvertor.castToPeriod(value); // Period
933        } else if (name.equals("practitioner")) {
934          this.practitioner = TypeConvertor.castToReference(value); // Reference
935        } else if (name.equals("organization")) {
936          this.organization = TypeConvertor.castToReference(value); // Reference
937        } else if (name.equals("code")) {
938          this.getCode().add(TypeConvertor.castToCodeableConcept(value));
939        } else if (name.equals("specialty")) {
940          this.getSpecialty().add(TypeConvertor.castToCodeableConcept(value));
941        } else if (name.equals("location")) {
942          this.getLocation().add(TypeConvertor.castToReference(value));
943        } else if (name.equals("healthcareService")) {
944          this.getHealthcareService().add(TypeConvertor.castToReference(value));
945        } else if (name.equals("contact")) {
946          this.getContact().add(TypeConvertor.castToExtendedContactDetail(value));
947        } else if (name.equals("characteristic")) {
948          this.getCharacteristic().add(TypeConvertor.castToCodeableConcept(value));
949        } else if (name.equals("communication")) {
950          this.getCommunication().add(TypeConvertor.castToCodeableConcept(value));
951        } else if (name.equals("availability")) {
952          this.getAvailability().add(TypeConvertor.castToAvailability(value));
953        } else if (name.equals("endpoint")) {
954          this.getEndpoint().add(TypeConvertor.castToReference(value));
955        } else
956          return super.setProperty(name, value);
957        return value;
958      }
959
960      @Override
961      public Base makeProperty(int hash, String name) throws FHIRException {
962        switch (hash) {
963        case -1618432855:  return addIdentifier(); 
964        case -1422950650:  return getActiveElement();
965        case -991726143:  return getPeriod();
966        case 574573338:  return getPractitioner();
967        case 1178922291:  return getOrganization();
968        case 3059181:  return addCode(); 
969        case -1694759682:  return addSpecialty(); 
970        case 1901043637:  return addLocation(); 
971        case 1289661064:  return addHealthcareService(); 
972        case 951526432:  return addContact(); 
973        case 366313883:  return addCharacteristic(); 
974        case -1035284522:  return addCommunication(); 
975        case 1997542747:  return addAvailability(); 
976        case 1741102485:  return addEndpoint(); 
977        default: return super.makeProperty(hash, name);
978        }
979
980      }
981
982      @Override
983      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
984        switch (hash) {
985        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
986        case -1422950650: /*active*/ return new String[] {"boolean"};
987        case -991726143: /*period*/ return new String[] {"Period"};
988        case 574573338: /*practitioner*/ return new String[] {"Reference"};
989        case 1178922291: /*organization*/ return new String[] {"Reference"};
990        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
991        case -1694759682: /*specialty*/ return new String[] {"CodeableConcept"};
992        case 1901043637: /*location*/ return new String[] {"Reference"};
993        case 1289661064: /*healthcareService*/ return new String[] {"Reference"};
994        case 951526432: /*contact*/ return new String[] {"ExtendedContactDetail"};
995        case 366313883: /*characteristic*/ return new String[] {"CodeableConcept"};
996        case -1035284522: /*communication*/ return new String[] {"CodeableConcept"};
997        case 1997542747: /*availability*/ return new String[] {"Availability"};
998        case 1741102485: /*endpoint*/ return new String[] {"Reference"};
999        default: return super.getTypesForProperty(hash, name);
1000        }
1001
1002      }
1003
1004      @Override
1005      public Base addChild(String name) throws FHIRException {
1006        if (name.equals("identifier")) {
1007          return addIdentifier();
1008        }
1009        else if (name.equals("active")) {
1010          throw new FHIRException("Cannot call addChild on a singleton property PractitionerRole.active");
1011        }
1012        else if (name.equals("period")) {
1013          this.period = new Period();
1014          return this.period;
1015        }
1016        else if (name.equals("practitioner")) {
1017          this.practitioner = new Reference();
1018          return this.practitioner;
1019        }
1020        else if (name.equals("organization")) {
1021          this.organization = new Reference();
1022          return this.organization;
1023        }
1024        else if (name.equals("code")) {
1025          return addCode();
1026        }
1027        else if (name.equals("specialty")) {
1028          return addSpecialty();
1029        }
1030        else if (name.equals("location")) {
1031          return addLocation();
1032        }
1033        else if (name.equals("healthcareService")) {
1034          return addHealthcareService();
1035        }
1036        else if (name.equals("contact")) {
1037          return addContact();
1038        }
1039        else if (name.equals("characteristic")) {
1040          return addCharacteristic();
1041        }
1042        else if (name.equals("communication")) {
1043          return addCommunication();
1044        }
1045        else if (name.equals("availability")) {
1046          return addAvailability();
1047        }
1048        else if (name.equals("endpoint")) {
1049          return addEndpoint();
1050        }
1051        else
1052          return super.addChild(name);
1053      }
1054
1055  public String fhirType() {
1056    return "PractitionerRole";
1057
1058  }
1059
1060      public PractitionerRole copy() {
1061        PractitionerRole dst = new PractitionerRole();
1062        copyValues(dst);
1063        return dst;
1064      }
1065
1066      public void copyValues(PractitionerRole dst) {
1067        super.copyValues(dst);
1068        if (identifier != null) {
1069          dst.identifier = new ArrayList<Identifier>();
1070          for (Identifier i : identifier)
1071            dst.identifier.add(i.copy());
1072        };
1073        dst.active = active == null ? null : active.copy();
1074        dst.period = period == null ? null : period.copy();
1075        dst.practitioner = practitioner == null ? null : practitioner.copy();
1076        dst.organization = organization == null ? null : organization.copy();
1077        if (code != null) {
1078          dst.code = new ArrayList<CodeableConcept>();
1079          for (CodeableConcept i : code)
1080            dst.code.add(i.copy());
1081        };
1082        if (specialty != null) {
1083          dst.specialty = new ArrayList<CodeableConcept>();
1084          for (CodeableConcept i : specialty)
1085            dst.specialty.add(i.copy());
1086        };
1087        if (location != null) {
1088          dst.location = new ArrayList<Reference>();
1089          for (Reference i : location)
1090            dst.location.add(i.copy());
1091        };
1092        if (healthcareService != null) {
1093          dst.healthcareService = new ArrayList<Reference>();
1094          for (Reference i : healthcareService)
1095            dst.healthcareService.add(i.copy());
1096        };
1097        if (contact != null) {
1098          dst.contact = new ArrayList<ExtendedContactDetail>();
1099          for (ExtendedContactDetail i : contact)
1100            dst.contact.add(i.copy());
1101        };
1102        if (characteristic != null) {
1103          dst.characteristic = new ArrayList<CodeableConcept>();
1104          for (CodeableConcept i : characteristic)
1105            dst.characteristic.add(i.copy());
1106        };
1107        if (communication != null) {
1108          dst.communication = new ArrayList<CodeableConcept>();
1109          for (CodeableConcept i : communication)
1110            dst.communication.add(i.copy());
1111        };
1112        if (availability != null) {
1113          dst.availability = new ArrayList<Availability>();
1114          for (Availability i : availability)
1115            dst.availability.add(i.copy());
1116        };
1117        if (endpoint != null) {
1118          dst.endpoint = new ArrayList<Reference>();
1119          for (Reference i : endpoint)
1120            dst.endpoint.add(i.copy());
1121        };
1122      }
1123
1124      protected PractitionerRole typedCopy() {
1125        return copy();
1126      }
1127
1128      @Override
1129      public boolean equalsDeep(Base other_) {
1130        if (!super.equalsDeep(other_))
1131          return false;
1132        if (!(other_ instanceof PractitionerRole))
1133          return false;
1134        PractitionerRole o = (PractitionerRole) other_;
1135        return compareDeep(identifier, o.identifier, true) && compareDeep(active, o.active, true) && compareDeep(period, o.period, true)
1136           && compareDeep(practitioner, o.practitioner, true) && compareDeep(organization, o.organization, true)
1137           && compareDeep(code, o.code, true) && compareDeep(specialty, o.specialty, true) && compareDeep(location, o.location, true)
1138           && compareDeep(healthcareService, o.healthcareService, true) && compareDeep(contact, o.contact, true)
1139           && compareDeep(characteristic, o.characteristic, true) && compareDeep(communication, o.communication, true)
1140           && compareDeep(availability, o.availability, true) && compareDeep(endpoint, o.endpoint, true);
1141      }
1142
1143      @Override
1144      public boolean equalsShallow(Base other_) {
1145        if (!super.equalsShallow(other_))
1146          return false;
1147        if (!(other_ instanceof PractitionerRole))
1148          return false;
1149        PractitionerRole o = (PractitionerRole) other_;
1150        return compareValues(active, o.active, true);
1151      }
1152
1153      public boolean isEmpty() {
1154        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, active, period
1155          , practitioner, organization, code, specialty, location, healthcareService, contact
1156          , characteristic, communication, availability, endpoint);
1157      }
1158
1159  @Override
1160  public ResourceType getResourceType() {
1161    return ResourceType.PractitionerRole;
1162   }
1163
1164 /**
1165   * Search parameter: <b>active</b>
1166   * <p>
1167   * Description: <b>Whether this practitioner role record is in active use</b><br>
1168   * Type: <b>token</b><br>
1169   * Path: <b>PractitionerRole.active</b><br>
1170   * </p>
1171   */
1172  @SearchParamDefinition(name="active", path="PractitionerRole.active", description="Whether this practitioner role record is in active use", type="token" )
1173  public static final String SP_ACTIVE = "active";
1174 /**
1175   * <b>Fluent Client</b> search parameter constant for <b>active</b>
1176   * <p>
1177   * Description: <b>Whether this practitioner role record is in active use</b><br>
1178   * Type: <b>token</b><br>
1179   * Path: <b>PractitionerRole.active</b><br>
1180   * </p>
1181   */
1182  public static final ca.uhn.fhir.rest.gclient.TokenClientParam ACTIVE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ACTIVE);
1183
1184 /**
1185   * Search parameter: <b>characteristic</b>
1186   * <p>
1187   * Description: <b>One of the PractitionerRole's characteristics</b><br>
1188   * Type: <b>token</b><br>
1189   * Path: <b>PractitionerRole.characteristic</b><br>
1190   * </p>
1191   */
1192  @SearchParamDefinition(name="characteristic", path="PractitionerRole.characteristic", description="One of the PractitionerRole's characteristics", type="token" )
1193  public static final String SP_CHARACTERISTIC = "characteristic";
1194 /**
1195   * <b>Fluent Client</b> search parameter constant for <b>characteristic</b>
1196   * <p>
1197   * Description: <b>One of the PractitionerRole's characteristics</b><br>
1198   * Type: <b>token</b><br>
1199   * Path: <b>PractitionerRole.characteristic</b><br>
1200   * </p>
1201   */
1202  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CHARACTERISTIC = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CHARACTERISTIC);
1203
1204 /**
1205   * Search parameter: <b>communication</b>
1206   * <p>
1207   * Description: <b>One of the languages that the practitioner can communicate with</b><br>
1208   * Type: <b>token</b><br>
1209   * Path: <b>PractitionerRole.communication</b><br>
1210   * </p>
1211   */
1212  @SearchParamDefinition(name="communication", path="PractitionerRole.communication", description="One of the languages that the practitioner can communicate with", type="token" )
1213  public static final String SP_COMMUNICATION = "communication";
1214 /**
1215   * <b>Fluent Client</b> search parameter constant for <b>communication</b>
1216   * <p>
1217   * Description: <b>One of the languages that the practitioner can communicate with</b><br>
1218   * Type: <b>token</b><br>
1219   * Path: <b>PractitionerRole.communication</b><br>
1220   * </p>
1221   */
1222  public static final ca.uhn.fhir.rest.gclient.TokenClientParam COMMUNICATION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_COMMUNICATION);
1223
1224 /**
1225   * Search parameter: <b>date</b>
1226   * <p>
1227   * Description: <b>The period during which the practitioner is authorized to perform in these role(s)</b><br>
1228   * Type: <b>date</b><br>
1229   * Path: <b>PractitionerRole.period</b><br>
1230   * </p>
1231   */
1232  @SearchParamDefinition(name="date", path="PractitionerRole.period", description="The period during which the practitioner is authorized to perform in these role(s)", type="date" )
1233  public static final String SP_DATE = "date";
1234 /**
1235   * <b>Fluent Client</b> search parameter constant for <b>date</b>
1236   * <p>
1237   * Description: <b>The period during which the practitioner is authorized to perform in these role(s)</b><br>
1238   * Type: <b>date</b><br>
1239   * Path: <b>PractitionerRole.period</b><br>
1240   * </p>
1241   */
1242  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
1243
1244 /**
1245   * Search parameter: <b>endpoint</b>
1246   * <p>
1247   * Description: <b>Technical endpoints providing access to services operated for the practitioner with this role</b><br>
1248   * Type: <b>reference</b><br>
1249   * Path: <b>PractitionerRole.endpoint</b><br>
1250   * </p>
1251   */
1252  @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 } )
1253  public static final String SP_ENDPOINT = "endpoint";
1254 /**
1255   * <b>Fluent Client</b> search parameter constant for <b>endpoint</b>
1256   * <p>
1257   * Description: <b>Technical endpoints providing access to services operated for the practitioner with this role</b><br>
1258   * Type: <b>reference</b><br>
1259   * Path: <b>PractitionerRole.endpoint</b><br>
1260   * </p>
1261   */
1262  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENDPOINT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENDPOINT);
1263
1264/**
1265   * Constant for fluent queries to be used to add include statements. Specifies
1266   * the path value of "<b>PractitionerRole:endpoint</b>".
1267   */
1268  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENDPOINT = new ca.uhn.fhir.model.api.Include("PractitionerRole:endpoint").toLocked();
1269
1270 /**
1271   * Search parameter: <b>identifier</b>
1272   * <p>
1273   * Description: <b>A practitioner's Identifier</b><br>
1274   * Type: <b>token</b><br>
1275   * Path: <b>PractitionerRole.identifier</b><br>
1276   * </p>
1277   */
1278  @SearchParamDefinition(name="identifier", path="PractitionerRole.identifier", description="A practitioner's Identifier", type="token" )
1279  public static final String SP_IDENTIFIER = "identifier";
1280 /**
1281   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
1282   * <p>
1283   * Description: <b>A practitioner's Identifier</b><br>
1284   * Type: <b>token</b><br>
1285   * Path: <b>PractitionerRole.identifier</b><br>
1286   * </p>
1287   */
1288  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
1289
1290 /**
1291   * Search parameter: <b>location</b>
1292   * <p>
1293   * Description: <b>One of the locations at which this practitioner provides care</b><br>
1294   * Type: <b>reference</b><br>
1295   * Path: <b>PractitionerRole.location</b><br>
1296   * </p>
1297   */
1298  @SearchParamDefinition(name="location", path="PractitionerRole.location", description="One of the locations at which this practitioner provides care", type="reference", target={Location.class } )
1299  public static final String SP_LOCATION = "location";
1300 /**
1301   * <b>Fluent Client</b> search parameter constant for <b>location</b>
1302   * <p>
1303   * Description: <b>One of the locations at which this practitioner provides care</b><br>
1304   * Type: <b>reference</b><br>
1305   * Path: <b>PractitionerRole.location</b><br>
1306   * </p>
1307   */
1308  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam LOCATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_LOCATION);
1309
1310/**
1311   * Constant for fluent queries to be used to add include statements. Specifies
1312   * the path value of "<b>PractitionerRole:location</b>".
1313   */
1314  public static final ca.uhn.fhir.model.api.Include INCLUDE_LOCATION = new ca.uhn.fhir.model.api.Include("PractitionerRole:location").toLocked();
1315
1316 /**
1317   * Search parameter: <b>organization</b>
1318   * <p>
1319   * Description: <b>The identity of the organization the practitioner represents / acts on behalf of</b><br>
1320   * Type: <b>reference</b><br>
1321   * Path: <b>PractitionerRole.organization</b><br>
1322   * </p>
1323   */
1324  @SearchParamDefinition(name="organization", path="PractitionerRole.organization", description="The identity of the organization the practitioner represents / acts on behalf of", type="reference", target={Organization.class } )
1325  public static final String SP_ORGANIZATION = "organization";
1326 /**
1327   * <b>Fluent Client</b> search parameter constant for <b>organization</b>
1328   * <p>
1329   * Description: <b>The identity of the organization the practitioner represents / acts on behalf of</b><br>
1330   * Type: <b>reference</b><br>
1331   * Path: <b>PractitionerRole.organization</b><br>
1332   * </p>
1333   */
1334  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION);
1335
1336/**
1337   * Constant for fluent queries to be used to add include statements. Specifies
1338   * the path value of "<b>PractitionerRole:organization</b>".
1339   */
1340  public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("PractitionerRole:organization").toLocked();
1341
1342 /**
1343   * Search parameter: <b>practitioner</b>
1344   * <p>
1345   * Description: <b>Practitioner that is able to provide the defined services for the organization</b><br>
1346   * Type: <b>reference</b><br>
1347   * Path: <b>PractitionerRole.practitioner</b><br>
1348   * </p>
1349   */
1350  @SearchParamDefinition(name="practitioner", path="PractitionerRole.practitioner", description="Practitioner that is able to provide the defined services for the organization", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Practitioner.class } )
1351  public static final String SP_PRACTITIONER = "practitioner";
1352 /**
1353   * <b>Fluent Client</b> search parameter constant for <b>practitioner</b>
1354   * <p>
1355   * Description: <b>Practitioner that is able to provide the defined services for the organization</b><br>
1356   * Type: <b>reference</b><br>
1357   * Path: <b>PractitionerRole.practitioner</b><br>
1358   * </p>
1359   */
1360  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PRACTITIONER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PRACTITIONER);
1361
1362/**
1363   * Constant for fluent queries to be used to add include statements. Specifies
1364   * the path value of "<b>PractitionerRole:practitioner</b>".
1365   */
1366  public static final ca.uhn.fhir.model.api.Include INCLUDE_PRACTITIONER = new ca.uhn.fhir.model.api.Include("PractitionerRole:practitioner").toLocked();
1367
1368 /**
1369   * Search parameter: <b>role</b>
1370   * <p>
1371   * Description: <b>The practitioner can perform this role at for the organization</b><br>
1372   * Type: <b>token</b><br>
1373   * Path: <b>PractitionerRole.code</b><br>
1374   * </p>
1375   */
1376  @SearchParamDefinition(name="role", path="PractitionerRole.code", description="The practitioner can perform this role at for the organization", type="token" )
1377  public static final String SP_ROLE = "role";
1378 /**
1379   * <b>Fluent Client</b> search parameter constant for <b>role</b>
1380   * <p>
1381   * Description: <b>The practitioner can perform this role at for the organization</b><br>
1382   * Type: <b>token</b><br>
1383   * Path: <b>PractitionerRole.code</b><br>
1384   * </p>
1385   */
1386  public static final ca.uhn.fhir.rest.gclient.TokenClientParam ROLE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ROLE);
1387
1388 /**
1389   * Search parameter: <b>service</b>
1390   * <p>
1391   * Description: <b>The list of healthcare services that this worker provides for this role's Organization/Location(s)</b><br>
1392   * Type: <b>reference</b><br>
1393   * Path: <b>PractitionerRole.healthcareService</b><br>
1394   * </p>
1395   */
1396  @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 } )
1397  public static final String SP_SERVICE = "service";
1398 /**
1399   * <b>Fluent Client</b> search parameter constant for <b>service</b>
1400   * <p>
1401   * Description: <b>The list of healthcare services that this worker provides for this role's Organization/Location(s)</b><br>
1402   * Type: <b>reference</b><br>
1403   * Path: <b>PractitionerRole.healthcareService</b><br>
1404   * </p>
1405   */
1406  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SERVICE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SERVICE);
1407
1408/**
1409   * Constant for fluent queries to be used to add include statements. Specifies
1410   * the path value of "<b>PractitionerRole:service</b>".
1411   */
1412  public static final ca.uhn.fhir.model.api.Include INCLUDE_SERVICE = new ca.uhn.fhir.model.api.Include("PractitionerRole:service").toLocked();
1413
1414 /**
1415   * Search parameter: <b>specialty</b>
1416   * <p>
1417   * Description: <b>The practitioner has this specialty at an organization</b><br>
1418   * Type: <b>token</b><br>
1419   * Path: <b>PractitionerRole.specialty</b><br>
1420   * </p>
1421   */
1422  @SearchParamDefinition(name="specialty", path="PractitionerRole.specialty", description="The practitioner has this specialty at an organization", type="token" )
1423  public static final String SP_SPECIALTY = "specialty";
1424 /**
1425   * <b>Fluent Client</b> search parameter constant for <b>specialty</b>
1426   * <p>
1427   * Description: <b>The practitioner has this specialty at an organization</b><br>
1428   * Type: <b>token</b><br>
1429   * Path: <b>PractitionerRole.specialty</b><br>
1430   * </p>
1431   */
1432  public static final ca.uhn.fhir.rest.gclient.TokenClientParam SPECIALTY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SPECIALTY);
1433
1434 /**
1435   * Search parameter: <b>email</b>
1436   * <p>
1437   * Description: <b>Multiple Resources: 
1438
1439* [Patient](patient.html): A value in an email contact
1440* [Person](person.html): A value in an email contact
1441* [Practitioner](practitioner.html): A value in an email contact
1442* [PractitionerRole](practitionerrole.html): A value in an email contact
1443* [RelatedPerson](relatedperson.html): A value in an email contact
1444</b><br>
1445   * Type: <b>token</b><br>
1446   * Path: <b>Patient.telecom.where(system='email') | Person.telecom.where(system='email') | Practitioner.telecom.where(system='email') | PractitionerRole.contact.telecom.where(system='email') | RelatedPerson.telecom.where(system='email')</b><br>
1447   * </p>
1448   */
1449  @SearchParamDefinition(name="email", path="Patient.telecom.where(system='email') | Person.telecom.where(system='email') | Practitioner.telecom.where(system='email') | PractitionerRole.contact.telecom.where(system='email') | RelatedPerson.telecom.where(system='email')", description="Multiple Resources: \r\n\r\n* [Patient](patient.html): A value in an email contact\r\n* [Person](person.html): A value in an email contact\r\n* [Practitioner](practitioner.html): A value in an email contact\r\n* [PractitionerRole](practitionerrole.html): A value in an email contact\r\n* [RelatedPerson](relatedperson.html): A value in an email contact\r\n", type="token" )
1450  public static final String SP_EMAIL = "email";
1451 /**
1452   * <b>Fluent Client</b> search parameter constant for <b>email</b>
1453   * <p>
1454   * Description: <b>Multiple Resources: 
1455
1456* [Patient](patient.html): A value in an email contact
1457* [Person](person.html): A value in an email contact
1458* [Practitioner](practitioner.html): A value in an email contact
1459* [PractitionerRole](practitionerrole.html): A value in an email contact
1460* [RelatedPerson](relatedperson.html): A value in an email contact
1461</b><br>
1462   * Type: <b>token</b><br>
1463   * Path: <b>Patient.telecom.where(system='email') | Person.telecom.where(system='email') | Practitioner.telecom.where(system='email') | PractitionerRole.contact.telecom.where(system='email') | RelatedPerson.telecom.where(system='email')</b><br>
1464   * </p>
1465   */
1466  public static final ca.uhn.fhir.rest.gclient.TokenClientParam EMAIL = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_EMAIL);
1467
1468 /**
1469   * Search parameter: <b>phone</b>
1470   * <p>
1471   * Description: <b>Multiple Resources: 
1472
1473* [Patient](patient.html): A value in a phone contact
1474* [Person](person.html): A value in a phone contact
1475* [Practitioner](practitioner.html): A value in a phone contact
1476* [PractitionerRole](practitionerrole.html): A value in a phone contact
1477* [RelatedPerson](relatedperson.html): A value in a phone contact
1478</b><br>
1479   * Type: <b>token</b><br>
1480   * Path: <b>Patient.telecom.where(system='phone') | Person.telecom.where(system='phone') | Practitioner.telecom.where(system='phone') | PractitionerRole.contact.telecom.where(system='phone') | RelatedPerson.telecom.where(system='phone')</b><br>
1481   * </p>
1482   */
1483  @SearchParamDefinition(name="phone", path="Patient.telecom.where(system='phone') | Person.telecom.where(system='phone') | Practitioner.telecom.where(system='phone') | PractitionerRole.contact.telecom.where(system='phone') | RelatedPerson.telecom.where(system='phone')", description="Multiple Resources: \r\n\r\n* [Patient](patient.html): A value in a phone contact\r\n* [Person](person.html): A value in a phone contact\r\n* [Practitioner](practitioner.html): A value in a phone contact\r\n* [PractitionerRole](practitionerrole.html): A value in a phone contact\r\n* [RelatedPerson](relatedperson.html): A value in a phone contact\r\n", type="token" )
1484  public static final String SP_PHONE = "phone";
1485 /**
1486   * <b>Fluent Client</b> search parameter constant for <b>phone</b>
1487   * <p>
1488   * Description: <b>Multiple Resources: 
1489
1490* [Patient](patient.html): A value in a phone contact
1491* [Person](person.html): A value in a phone contact
1492* [Practitioner](practitioner.html): A value in a phone contact
1493* [PractitionerRole](practitionerrole.html): A value in a phone contact
1494* [RelatedPerson](relatedperson.html): A value in a phone contact
1495</b><br>
1496   * Type: <b>token</b><br>
1497   * Path: <b>Patient.telecom.where(system='phone') | Person.telecom.where(system='phone') | Practitioner.telecom.where(system='phone') | PractitionerRole.contact.telecom.where(system='phone') | RelatedPerson.telecom.where(system='phone')</b><br>
1498   * </p>
1499   */
1500  public static final ca.uhn.fhir.rest.gclient.TokenClientParam PHONE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PHONE);
1501
1502 /**
1503   * Search parameter: <b>telecom</b>
1504   * <p>
1505   * Description: <b>Multiple Resources: 
1506
1507* [Patient](patient.html): The value in any kind of telecom details of the patient
1508* [Person](person.html): The value in any kind of contact
1509* [Practitioner](practitioner.html): The value in any kind of contact
1510* [PractitionerRole](practitionerrole.html): The value in any kind of contact
1511* [RelatedPerson](relatedperson.html): The value in any kind of contact
1512</b><br>
1513   * Type: <b>token</b><br>
1514   * Path: <b>Patient.telecom | Person.telecom | Practitioner.telecom | PractitionerRole.contact.telecom | RelatedPerson.telecom</b><br>
1515   * </p>
1516   */
1517  @SearchParamDefinition(name="telecom", path="Patient.telecom | Person.telecom | Practitioner.telecom | PractitionerRole.contact.telecom | RelatedPerson.telecom", description="Multiple Resources: \r\n\r\n* [Patient](patient.html): The value in any kind of telecom details of the patient\r\n* [Person](person.html): The value in any kind of contact\r\n* [Practitioner](practitioner.html): The value in any kind of contact\r\n* [PractitionerRole](practitionerrole.html): The value in any kind of contact\r\n* [RelatedPerson](relatedperson.html): The value in any kind of contact\r\n", type="token" )
1518  public static final String SP_TELECOM = "telecom";
1519 /**
1520   * <b>Fluent Client</b> search parameter constant for <b>telecom</b>
1521   * <p>
1522   * Description: <b>Multiple Resources: 
1523
1524* [Patient](patient.html): The value in any kind of telecom details of the patient
1525* [Person](person.html): The value in any kind of contact
1526* [Practitioner](practitioner.html): The value in any kind of contact
1527* [PractitionerRole](practitionerrole.html): The value in any kind of contact
1528* [RelatedPerson](relatedperson.html): The value in any kind of contact
1529</b><br>
1530   * Type: <b>token</b><br>
1531   * Path: <b>Patient.telecom | Person.telecom | Practitioner.telecom | PractitionerRole.contact.telecom | RelatedPerson.telecom</b><br>
1532   * </p>
1533   */
1534  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TELECOM = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TELECOM);
1535
1536
1537}
1538