001package org.hl7.fhir.dstu2016may.model;
002
003
004
005
006/*
007  Copyright (c) 2011+, HL7, Inc.
008  All rights reserved.
009  
010  Redistribution and use in source and binary forms, with or without modification, 
011  are permitted provided that the following conditions are met:
012  
013   * Redistributions of source code must retain the above copyright notice, this 
014     list of conditions and the following disclaimer.
015   * Redistributions in binary form must reproduce the above copyright notice, 
016     this list of conditions and the following disclaimer in the documentation 
017     and/or other materials provided with the distribution.
018   * Neither the name of HL7 nor the names of its contributors may be used to 
019     endorse or promote products derived from this software without specific 
020     prior written permission.
021  
022  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
023  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
024  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
025  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
026  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
027  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
028  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
029  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
030  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
031  POSSIBILITY OF SUCH DAMAGE.
032  
033*/
034
035// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0
036import java.util.ArrayList;
037import java.util.Date;
038import java.util.List;
039
040import org.hl7.fhir.dstu2016may.model.Enumerations.AdministrativeGender;
041import org.hl7.fhir.dstu2016may.model.Enumerations.AdministrativeGenderEnumFactory;
042import org.hl7.fhir.exceptions.FHIRException;
043import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
044
045import ca.uhn.fhir.model.api.annotation.Block;
046import ca.uhn.fhir.model.api.annotation.Child;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.ResourceDef;
049import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
050/**
051 * A person who is directly or indirectly involved in the provisioning of healthcare.
052 */
053@ResourceDef(name="Practitioner", profile="http://hl7.org/fhir/Profile/Practitioner")
054public class Practitioner extends DomainResource {
055
056    @Block()
057    public static class PractitionerPractitionerRoleComponent extends BackboneElement implements IBaseBackboneElement {
058        /**
059         * The organization where the Practitioner performs the roles associated.
060         */
061        @Child(name = "organization", type = {Organization.class}, order=1, min=0, max=1, modifier=false, summary=false)
062        @Description(shortDefinition="Organization where the roles are performed", formalDefinition="The organization where the Practitioner performs the roles associated." )
063        protected Reference organization;
064
065        /**
066         * The actual object that is the target of the reference (The organization where the Practitioner performs the roles associated.)
067         */
068        protected Organization organizationTarget;
069
070        /**
071         * Roles which this practitioner is authorized to perform for the organization.
072         */
073        @Child(name = "role", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true)
074        @Description(shortDefinition="Roles which this practitioner may perform", formalDefinition="Roles which this practitioner is authorized to perform for the organization." )
075        protected CodeableConcept role;
076
077        /**
078         * Specific specialty of the practitioner.
079         */
080        @Child(name = "specialty", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
081        @Description(shortDefinition="Specific specialty of the practitioner", formalDefinition="Specific specialty of the practitioner." )
082        protected List<CodeableConcept> specialty;
083
084        /**
085         * Business Identifiers that are specific to a role/location.
086         */
087        @Child(name = "identifier", type = {Identifier.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
088        @Description(shortDefinition="Business Identifiers that are specific to a role/location", formalDefinition="Business Identifiers that are specific to a role/location." )
089        protected List<Identifier> identifier;
090
091        /**
092         * Contact details that are specific to the role/location/service.
093         */
094        @Child(name = "telecom", type = {ContactPoint.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
095        @Description(shortDefinition="Contact details that are specific to the role/location/service", formalDefinition="Contact details that are specific to the role/location/service." )
096        protected List<ContactPoint> telecom;
097
098        /**
099         * The period during which the person is authorized to act as a practitioner in these role(s) for the organization.
100         */
101        @Child(name = "period", type = {Period.class}, order=6, min=0, max=1, modifier=false, summary=true)
102        @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." )
103        protected Period period;
104
105        /**
106         * The location(s) at which this practitioner provides care.
107         */
108        @Child(name = "location", type = {Location.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
109        @Description(shortDefinition="The location(s) at which this practitioner provides care", formalDefinition="The location(s) at which this practitioner provides care." )
110        protected List<Reference> location;
111        /**
112         * The actual objects that are the target of the reference (The location(s) at which this practitioner provides care.)
113         */
114        protected List<Location> locationTarget;
115
116
117        /**
118         * The list of healthcare services that this worker provides for this role's Organization/Location(s).
119         */
120        @Child(name = "healthcareService", type = {HealthcareService.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
121        @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)." )
122        protected List<Reference> healthcareService;
123        /**
124         * 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).)
125         */
126        protected List<HealthcareService> healthcareServiceTarget;
127
128
129        private static final long serialVersionUID = -2082448551L;
130
131    /**
132     * Constructor
133     */
134      public PractitionerPractitionerRoleComponent() {
135        super();
136      }
137
138        /**
139         * @return {@link #organization} (The organization where the Practitioner performs the roles associated.)
140         */
141        public Reference getOrganization() { 
142          if (this.organization == null)
143            if (Configuration.errorOnAutoCreate())
144              throw new Error("Attempt to auto-create PractitionerPractitionerRoleComponent.organization");
145            else if (Configuration.doAutoCreate())
146              this.organization = new Reference(); // cc
147          return this.organization;
148        }
149
150        public boolean hasOrganization() { 
151          return this.organization != null && !this.organization.isEmpty();
152        }
153
154        /**
155         * @param value {@link #organization} (The organization where the Practitioner performs the roles associated.)
156         */
157        public PractitionerPractitionerRoleComponent setOrganization(Reference value) { 
158          this.organization = value;
159          return this;
160        }
161
162        /**
163         * @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.)
164         */
165        public Organization getOrganizationTarget() { 
166          if (this.organizationTarget == null)
167            if (Configuration.errorOnAutoCreate())
168              throw new Error("Attempt to auto-create PractitionerPractitionerRoleComponent.organization");
169            else if (Configuration.doAutoCreate())
170              this.organizationTarget = new Organization(); // aa
171          return this.organizationTarget;
172        }
173
174        /**
175         * @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.)
176         */
177        public PractitionerPractitionerRoleComponent setOrganizationTarget(Organization value) { 
178          this.organizationTarget = value;
179          return this;
180        }
181
182        /**
183         * @return {@link #role} (Roles which this practitioner is authorized to perform for the organization.)
184         */
185        public CodeableConcept getRole() { 
186          if (this.role == null)
187            if (Configuration.errorOnAutoCreate())
188              throw new Error("Attempt to auto-create PractitionerPractitionerRoleComponent.role");
189            else if (Configuration.doAutoCreate())
190              this.role = new CodeableConcept(); // cc
191          return this.role;
192        }
193
194        public boolean hasRole() { 
195          return this.role != null && !this.role.isEmpty();
196        }
197
198        /**
199         * @param value {@link #role} (Roles which this practitioner is authorized to perform for the organization.)
200         */
201        public PractitionerPractitionerRoleComponent setRole(CodeableConcept value) { 
202          this.role = value;
203          return this;
204        }
205
206        /**
207         * @return {@link #specialty} (Specific specialty of the practitioner.)
208         */
209        public List<CodeableConcept> getSpecialty() { 
210          if (this.specialty == null)
211            this.specialty = new ArrayList<CodeableConcept>();
212          return this.specialty;
213        }
214
215        public boolean hasSpecialty() { 
216          if (this.specialty == null)
217            return false;
218          for (CodeableConcept item : this.specialty)
219            if (!item.isEmpty())
220              return true;
221          return false;
222        }
223
224        /**
225         * @return {@link #specialty} (Specific specialty of the practitioner.)
226         */
227    // syntactic sugar
228        public CodeableConcept addSpecialty() { //3
229          CodeableConcept t = new CodeableConcept();
230          if (this.specialty == null)
231            this.specialty = new ArrayList<CodeableConcept>();
232          this.specialty.add(t);
233          return t;
234        }
235
236    // syntactic sugar
237        public PractitionerPractitionerRoleComponent addSpecialty(CodeableConcept t) { //3
238          if (t == null)
239            return this;
240          if (this.specialty == null)
241            this.specialty = new ArrayList<CodeableConcept>();
242          this.specialty.add(t);
243          return this;
244        }
245
246        /**
247         * @return {@link #identifier} (Business Identifiers that are specific to a role/location.)
248         */
249        public List<Identifier> getIdentifier() { 
250          if (this.identifier == null)
251            this.identifier = new ArrayList<Identifier>();
252          return this.identifier;
253        }
254
255        public boolean hasIdentifier() { 
256          if (this.identifier == null)
257            return false;
258          for (Identifier item : this.identifier)
259            if (!item.isEmpty())
260              return true;
261          return false;
262        }
263
264        /**
265         * @return {@link #identifier} (Business Identifiers that are specific to a role/location.)
266         */
267    // syntactic sugar
268        public Identifier addIdentifier() { //3
269          Identifier t = new Identifier();
270          if (this.identifier == null)
271            this.identifier = new ArrayList<Identifier>();
272          this.identifier.add(t);
273          return t;
274        }
275
276    // syntactic sugar
277        public PractitionerPractitionerRoleComponent addIdentifier(Identifier t) { //3
278          if (t == null)
279            return this;
280          if (this.identifier == null)
281            this.identifier = new ArrayList<Identifier>();
282          this.identifier.add(t);
283          return this;
284        }
285
286        /**
287         * @return {@link #telecom} (Contact details that are specific to the role/location/service.)
288         */
289        public List<ContactPoint> getTelecom() { 
290          if (this.telecom == null)
291            this.telecom = new ArrayList<ContactPoint>();
292          return this.telecom;
293        }
294
295        public boolean hasTelecom() { 
296          if (this.telecom == null)
297            return false;
298          for (ContactPoint item : this.telecom)
299            if (!item.isEmpty())
300              return true;
301          return false;
302        }
303
304        /**
305         * @return {@link #telecom} (Contact details that are specific to the role/location/service.)
306         */
307    // syntactic sugar
308        public ContactPoint addTelecom() { //3
309          ContactPoint t = new ContactPoint();
310          if (this.telecom == null)
311            this.telecom = new ArrayList<ContactPoint>();
312          this.telecom.add(t);
313          return t;
314        }
315
316    // syntactic sugar
317        public PractitionerPractitionerRoleComponent addTelecom(ContactPoint t) { //3
318          if (t == null)
319            return this;
320          if (this.telecom == null)
321            this.telecom = new ArrayList<ContactPoint>();
322          this.telecom.add(t);
323          return this;
324        }
325
326        /**
327         * @return {@link #period} (The period during which the person is authorized to act as a practitioner in these role(s) for the organization.)
328         */
329        public Period getPeriod() { 
330          if (this.period == null)
331            if (Configuration.errorOnAutoCreate())
332              throw new Error("Attempt to auto-create PractitionerPractitionerRoleComponent.period");
333            else if (Configuration.doAutoCreate())
334              this.period = new Period(); // cc
335          return this.period;
336        }
337
338        public boolean hasPeriod() { 
339          return this.period != null && !this.period.isEmpty();
340        }
341
342        /**
343         * @param value {@link #period} (The period during which the person is authorized to act as a practitioner in these role(s) for the organization.)
344         */
345        public PractitionerPractitionerRoleComponent setPeriod(Period value) { 
346          this.period = value;
347          return this;
348        }
349
350        /**
351         * @return {@link #location} (The location(s) at which this practitioner provides care.)
352         */
353        public List<Reference> getLocation() { 
354          if (this.location == null)
355            this.location = new ArrayList<Reference>();
356          return this.location;
357        }
358
359        public boolean hasLocation() { 
360          if (this.location == null)
361            return false;
362          for (Reference item : this.location)
363            if (!item.isEmpty())
364              return true;
365          return false;
366        }
367
368        /**
369         * @return {@link #location} (The location(s) at which this practitioner provides care.)
370         */
371    // syntactic sugar
372        public Reference addLocation() { //3
373          Reference t = new Reference();
374          if (this.location == null)
375            this.location = new ArrayList<Reference>();
376          this.location.add(t);
377          return t;
378        }
379
380    // syntactic sugar
381        public PractitionerPractitionerRoleComponent addLocation(Reference t) { //3
382          if (t == null)
383            return this;
384          if (this.location == null)
385            this.location = new ArrayList<Reference>();
386          this.location.add(t);
387          return this;
388        }
389
390        /**
391         * @return {@link #location} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The location(s) at which this practitioner provides care.)
392         */
393        public List<Location> getLocationTarget() { 
394          if (this.locationTarget == null)
395            this.locationTarget = new ArrayList<Location>();
396          return this.locationTarget;
397        }
398
399    // syntactic sugar
400        /**
401         * @return {@link #location} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. The location(s) at which this practitioner provides care.)
402         */
403        public Location addLocationTarget() { 
404          Location r = new Location();
405          if (this.locationTarget == null)
406            this.locationTarget = new ArrayList<Location>();
407          this.locationTarget.add(r);
408          return r;
409        }
410
411        /**
412         * @return {@link #healthcareService} (The list of healthcare services that this worker provides for this role's Organization/Location(s).)
413         */
414        public List<Reference> getHealthcareService() { 
415          if (this.healthcareService == null)
416            this.healthcareService = new ArrayList<Reference>();
417          return this.healthcareService;
418        }
419
420        public boolean hasHealthcareService() { 
421          if (this.healthcareService == null)
422            return false;
423          for (Reference item : this.healthcareService)
424            if (!item.isEmpty())
425              return true;
426          return false;
427        }
428
429        /**
430         * @return {@link #healthcareService} (The list of healthcare services that this worker provides for this role's Organization/Location(s).)
431         */
432    // syntactic sugar
433        public Reference addHealthcareService() { //3
434          Reference t = new Reference();
435          if (this.healthcareService == null)
436            this.healthcareService = new ArrayList<Reference>();
437          this.healthcareService.add(t);
438          return t;
439        }
440
441    // syntactic sugar
442        public PractitionerPractitionerRoleComponent addHealthcareService(Reference t) { //3
443          if (t == null)
444            return this;
445          if (this.healthcareService == null)
446            this.healthcareService = new ArrayList<Reference>();
447          this.healthcareService.add(t);
448          return this;
449        }
450
451        /**
452         * @return {@link #healthcareService} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The list of healthcare services that this worker provides for this role's Organization/Location(s).)
453         */
454        public List<HealthcareService> getHealthcareServiceTarget() { 
455          if (this.healthcareServiceTarget == null)
456            this.healthcareServiceTarget = new ArrayList<HealthcareService>();
457          return this.healthcareServiceTarget;
458        }
459
460    // syntactic sugar
461        /**
462         * @return {@link #healthcareService} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. The list of healthcare services that this worker provides for this role's Organization/Location(s).)
463         */
464        public HealthcareService addHealthcareServiceTarget() { 
465          HealthcareService r = new HealthcareService();
466          if (this.healthcareServiceTarget == null)
467            this.healthcareServiceTarget = new ArrayList<HealthcareService>();
468          this.healthcareServiceTarget.add(r);
469          return r;
470        }
471
472        protected void listChildren(List<Property> childrenList) {
473          super.listChildren(childrenList);
474          childrenList.add(new Property("organization", "Reference(Organization)", "The organization where the Practitioner performs the roles associated.", 0, java.lang.Integer.MAX_VALUE, organization));
475          childrenList.add(new Property("role", "CodeableConcept", "Roles which this practitioner is authorized to perform for the organization.", 0, java.lang.Integer.MAX_VALUE, role));
476          childrenList.add(new Property("specialty", "CodeableConcept", "Specific specialty of the practitioner.", 0, java.lang.Integer.MAX_VALUE, specialty));
477          childrenList.add(new Property("identifier", "Identifier", "Business Identifiers that are specific to a role/location.", 0, java.lang.Integer.MAX_VALUE, identifier));
478          childrenList.add(new Property("telecom", "ContactPoint", "Contact details that are specific to the role/location/service.", 0, java.lang.Integer.MAX_VALUE, telecom));
479          childrenList.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, java.lang.Integer.MAX_VALUE, period));
480          childrenList.add(new Property("location", "Reference(Location)", "The location(s) at which this practitioner provides care.", 0, java.lang.Integer.MAX_VALUE, location));
481          childrenList.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));
482        }
483
484      @Override
485      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
486        switch (hash) {
487        case 1178922291: /*organization*/ return this.organization == null ? new Base[0] : new Base[] {this.organization}; // Reference
488        case 3506294: /*role*/ return this.role == null ? new Base[0] : new Base[] {this.role}; // CodeableConcept
489        case -1694759682: /*specialty*/ return this.specialty == null ? new Base[0] : this.specialty.toArray(new Base[this.specialty.size()]); // CodeableConcept
490        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
491        case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint
492        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
493        case 1901043637: /*location*/ return this.location == null ? new Base[0] : this.location.toArray(new Base[this.location.size()]); // Reference
494        case 1289661064: /*healthcareService*/ return this.healthcareService == null ? new Base[0] : this.healthcareService.toArray(new Base[this.healthcareService.size()]); // Reference
495        default: return super.getProperty(hash, name, checkValid);
496        }
497
498      }
499
500      @Override
501      public void setProperty(int hash, String name, Base value) throws FHIRException {
502        switch (hash) {
503        case 1178922291: // organization
504          this.organization = castToReference(value); // Reference
505          break;
506        case 3506294: // role
507          this.role = castToCodeableConcept(value); // CodeableConcept
508          break;
509        case -1694759682: // specialty
510          this.getSpecialty().add(castToCodeableConcept(value)); // CodeableConcept
511          break;
512        case -1618432855: // identifier
513          this.getIdentifier().add(castToIdentifier(value)); // Identifier
514          break;
515        case -1429363305: // telecom
516          this.getTelecom().add(castToContactPoint(value)); // ContactPoint
517          break;
518        case -991726143: // period
519          this.period = castToPeriod(value); // Period
520          break;
521        case 1901043637: // location
522          this.getLocation().add(castToReference(value)); // Reference
523          break;
524        case 1289661064: // healthcareService
525          this.getHealthcareService().add(castToReference(value)); // Reference
526          break;
527        default: super.setProperty(hash, name, value);
528        }
529
530      }
531
532      @Override
533      public void setProperty(String name, Base value) throws FHIRException {
534        if (name.equals("organization"))
535          this.organization = castToReference(value); // Reference
536        else if (name.equals("role"))
537          this.role = castToCodeableConcept(value); // CodeableConcept
538        else if (name.equals("specialty"))
539          this.getSpecialty().add(castToCodeableConcept(value));
540        else if (name.equals("identifier"))
541          this.getIdentifier().add(castToIdentifier(value));
542        else if (name.equals("telecom"))
543          this.getTelecom().add(castToContactPoint(value));
544        else if (name.equals("period"))
545          this.period = castToPeriod(value); // Period
546        else if (name.equals("location"))
547          this.getLocation().add(castToReference(value));
548        else if (name.equals("healthcareService"))
549          this.getHealthcareService().add(castToReference(value));
550        else
551          super.setProperty(name, value);
552      }
553
554      @Override
555      public Base makeProperty(int hash, String name) throws FHIRException {
556        switch (hash) {
557        case 1178922291:  return getOrganization(); // Reference
558        case 3506294:  return getRole(); // CodeableConcept
559        case -1694759682:  return addSpecialty(); // CodeableConcept
560        case -1618432855:  return addIdentifier(); // Identifier
561        case -1429363305:  return addTelecom(); // ContactPoint
562        case -991726143:  return getPeriod(); // Period
563        case 1901043637:  return addLocation(); // Reference
564        case 1289661064:  return addHealthcareService(); // Reference
565        default: return super.makeProperty(hash, name);
566        }
567
568      }
569
570      @Override
571      public Base addChild(String name) throws FHIRException {
572        if (name.equals("organization")) {
573          this.organization = new Reference();
574          return this.organization;
575        }
576        else if (name.equals("role")) {
577          this.role = new CodeableConcept();
578          return this.role;
579        }
580        else if (name.equals("specialty")) {
581          return addSpecialty();
582        }
583        else if (name.equals("identifier")) {
584          return addIdentifier();
585        }
586        else if (name.equals("telecom")) {
587          return addTelecom();
588        }
589        else if (name.equals("period")) {
590          this.period = new Period();
591          return this.period;
592        }
593        else if (name.equals("location")) {
594          return addLocation();
595        }
596        else if (name.equals("healthcareService")) {
597          return addHealthcareService();
598        }
599        else
600          return super.addChild(name);
601      }
602
603      public PractitionerPractitionerRoleComponent copy() {
604        PractitionerPractitionerRoleComponent dst = new PractitionerPractitionerRoleComponent();
605        copyValues(dst);
606        dst.organization = organization == null ? null : organization.copy();
607        dst.role = role == null ? null : role.copy();
608        if (specialty != null) {
609          dst.specialty = new ArrayList<CodeableConcept>();
610          for (CodeableConcept i : specialty)
611            dst.specialty.add(i.copy());
612        };
613        if (identifier != null) {
614          dst.identifier = new ArrayList<Identifier>();
615          for (Identifier i : identifier)
616            dst.identifier.add(i.copy());
617        };
618        if (telecom != null) {
619          dst.telecom = new ArrayList<ContactPoint>();
620          for (ContactPoint i : telecom)
621            dst.telecom.add(i.copy());
622        };
623        dst.period = period == null ? null : period.copy();
624        if (location != null) {
625          dst.location = new ArrayList<Reference>();
626          for (Reference i : location)
627            dst.location.add(i.copy());
628        };
629        if (healthcareService != null) {
630          dst.healthcareService = new ArrayList<Reference>();
631          for (Reference i : healthcareService)
632            dst.healthcareService.add(i.copy());
633        };
634        return dst;
635      }
636
637      @Override
638      public boolean equalsDeep(Base other) {
639        if (!super.equalsDeep(other))
640          return false;
641        if (!(other instanceof PractitionerPractitionerRoleComponent))
642          return false;
643        PractitionerPractitionerRoleComponent o = (PractitionerPractitionerRoleComponent) other;
644        return compareDeep(organization, o.organization, true) && compareDeep(role, o.role, true) && compareDeep(specialty, o.specialty, true)
645           && compareDeep(identifier, o.identifier, true) && compareDeep(telecom, o.telecom, true) && compareDeep(period, o.period, true)
646           && compareDeep(location, o.location, true) && compareDeep(healthcareService, o.healthcareService, true)
647          ;
648      }
649
650      @Override
651      public boolean equalsShallow(Base other) {
652        if (!super.equalsShallow(other))
653          return false;
654        if (!(other instanceof PractitionerPractitionerRoleComponent))
655          return false;
656        PractitionerPractitionerRoleComponent o = (PractitionerPractitionerRoleComponent) other;
657        return true;
658      }
659
660      public boolean isEmpty() {
661        return super.isEmpty() && (organization == null || organization.isEmpty()) && (role == null || role.isEmpty())
662           && (specialty == null || specialty.isEmpty()) && (identifier == null || identifier.isEmpty())
663           && (telecom == null || telecom.isEmpty()) && (period == null || period.isEmpty()) && (location == null || location.isEmpty())
664           && (healthcareService == null || healthcareService.isEmpty());
665      }
666
667  public String fhirType() {
668    return "Practitioner.practitionerRole";
669
670  }
671
672  }
673
674    @Block()
675    public static class PractitionerQualificationComponent extends BackboneElement implements IBaseBackboneElement {
676        /**
677         * An identifier that applies to this person's qualification in this role.
678         */
679        @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
680        @Description(shortDefinition="An identifier for this qualification for the practitioner", formalDefinition="An identifier that applies to this person's qualification in this role." )
681        protected List<Identifier> identifier;
682
683        /**
684         * Coded representation of the qualification.
685         */
686        @Child(name = "code", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=false)
687        @Description(shortDefinition="Coded representation of the qualification", formalDefinition="Coded representation of the qualification." )
688        protected CodeableConcept code;
689
690        /**
691         * Period during which the qualification is valid.
692         */
693        @Child(name = "period", type = {Period.class}, order=3, min=0, max=1, modifier=false, summary=false)
694        @Description(shortDefinition="Period during which the qualification is valid", formalDefinition="Period during which the qualification is valid." )
695        protected Period period;
696
697        /**
698         * Organization that regulates and issues the qualification.
699         */
700        @Child(name = "issuer", type = {Organization.class}, order=4, min=0, max=1, modifier=false, summary=false)
701        @Description(shortDefinition="Organization that regulates and issues the qualification", formalDefinition="Organization that regulates and issues the qualification." )
702        protected Reference issuer;
703
704        /**
705         * The actual object that is the target of the reference (Organization that regulates and issues the qualification.)
706         */
707        protected Organization issuerTarget;
708
709        private static final long serialVersionUID = 1095219071L;
710
711    /**
712     * Constructor
713     */
714      public PractitionerQualificationComponent() {
715        super();
716      }
717
718    /**
719     * Constructor
720     */
721      public PractitionerQualificationComponent(CodeableConcept code) {
722        super();
723        this.code = code;
724      }
725
726        /**
727         * @return {@link #identifier} (An identifier that applies to this person's qualification in this role.)
728         */
729        public List<Identifier> getIdentifier() { 
730          if (this.identifier == null)
731            this.identifier = new ArrayList<Identifier>();
732          return this.identifier;
733        }
734
735        public boolean hasIdentifier() { 
736          if (this.identifier == null)
737            return false;
738          for (Identifier item : this.identifier)
739            if (!item.isEmpty())
740              return true;
741          return false;
742        }
743
744        /**
745         * @return {@link #identifier} (An identifier that applies to this person's qualification in this role.)
746         */
747    // syntactic sugar
748        public Identifier addIdentifier() { //3
749          Identifier t = new Identifier();
750          if (this.identifier == null)
751            this.identifier = new ArrayList<Identifier>();
752          this.identifier.add(t);
753          return t;
754        }
755
756    // syntactic sugar
757        public PractitionerQualificationComponent addIdentifier(Identifier t) { //3
758          if (t == null)
759            return this;
760          if (this.identifier == null)
761            this.identifier = new ArrayList<Identifier>();
762          this.identifier.add(t);
763          return this;
764        }
765
766        /**
767         * @return {@link #code} (Coded representation of the qualification.)
768         */
769        public CodeableConcept getCode() { 
770          if (this.code == null)
771            if (Configuration.errorOnAutoCreate())
772              throw new Error("Attempt to auto-create PractitionerQualificationComponent.code");
773            else if (Configuration.doAutoCreate())
774              this.code = new CodeableConcept(); // cc
775          return this.code;
776        }
777
778        public boolean hasCode() { 
779          return this.code != null && !this.code.isEmpty();
780        }
781
782        /**
783         * @param value {@link #code} (Coded representation of the qualification.)
784         */
785        public PractitionerQualificationComponent setCode(CodeableConcept value) { 
786          this.code = value;
787          return this;
788        }
789
790        /**
791         * @return {@link #period} (Period during which the qualification is valid.)
792         */
793        public Period getPeriod() { 
794          if (this.period == null)
795            if (Configuration.errorOnAutoCreate())
796              throw new Error("Attempt to auto-create PractitionerQualificationComponent.period");
797            else if (Configuration.doAutoCreate())
798              this.period = new Period(); // cc
799          return this.period;
800        }
801
802        public boolean hasPeriod() { 
803          return this.period != null && !this.period.isEmpty();
804        }
805
806        /**
807         * @param value {@link #period} (Period during which the qualification is valid.)
808         */
809        public PractitionerQualificationComponent setPeriod(Period value) { 
810          this.period = value;
811          return this;
812        }
813
814        /**
815         * @return {@link #issuer} (Organization that regulates and issues the qualification.)
816         */
817        public Reference getIssuer() { 
818          if (this.issuer == null)
819            if (Configuration.errorOnAutoCreate())
820              throw new Error("Attempt to auto-create PractitionerQualificationComponent.issuer");
821            else if (Configuration.doAutoCreate())
822              this.issuer = new Reference(); // cc
823          return this.issuer;
824        }
825
826        public boolean hasIssuer() { 
827          return this.issuer != null && !this.issuer.isEmpty();
828        }
829
830        /**
831         * @param value {@link #issuer} (Organization that regulates and issues the qualification.)
832         */
833        public PractitionerQualificationComponent setIssuer(Reference value) { 
834          this.issuer = value;
835          return this;
836        }
837
838        /**
839         * @return {@link #issuer} 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. (Organization that regulates and issues the qualification.)
840         */
841        public Organization getIssuerTarget() { 
842          if (this.issuerTarget == null)
843            if (Configuration.errorOnAutoCreate())
844              throw new Error("Attempt to auto-create PractitionerQualificationComponent.issuer");
845            else if (Configuration.doAutoCreate())
846              this.issuerTarget = new Organization(); // aa
847          return this.issuerTarget;
848        }
849
850        /**
851         * @param value {@link #issuer} 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. (Organization that regulates and issues the qualification.)
852         */
853        public PractitionerQualificationComponent setIssuerTarget(Organization value) { 
854          this.issuerTarget = value;
855          return this;
856        }
857
858        protected void listChildren(List<Property> childrenList) {
859          super.listChildren(childrenList);
860          childrenList.add(new Property("identifier", "Identifier", "An identifier that applies to this person's qualification in this role.", 0, java.lang.Integer.MAX_VALUE, identifier));
861          childrenList.add(new Property("code", "CodeableConcept", "Coded representation of the qualification.", 0, java.lang.Integer.MAX_VALUE, code));
862          childrenList.add(new Property("period", "Period", "Period during which the qualification is valid.", 0, java.lang.Integer.MAX_VALUE, period));
863          childrenList.add(new Property("issuer", "Reference(Organization)", "Organization that regulates and issues the qualification.", 0, java.lang.Integer.MAX_VALUE, issuer));
864        }
865
866      @Override
867      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
868        switch (hash) {
869        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
870        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
871        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
872        case -1179159879: /*issuer*/ return this.issuer == null ? new Base[0] : new Base[] {this.issuer}; // Reference
873        default: return super.getProperty(hash, name, checkValid);
874        }
875
876      }
877
878      @Override
879      public void setProperty(int hash, String name, Base value) throws FHIRException {
880        switch (hash) {
881        case -1618432855: // identifier
882          this.getIdentifier().add(castToIdentifier(value)); // Identifier
883          break;
884        case 3059181: // code
885          this.code = castToCodeableConcept(value); // CodeableConcept
886          break;
887        case -991726143: // period
888          this.period = castToPeriod(value); // Period
889          break;
890        case -1179159879: // issuer
891          this.issuer = castToReference(value); // Reference
892          break;
893        default: super.setProperty(hash, name, value);
894        }
895
896      }
897
898      @Override
899      public void setProperty(String name, Base value) throws FHIRException {
900        if (name.equals("identifier"))
901          this.getIdentifier().add(castToIdentifier(value));
902        else if (name.equals("code"))
903          this.code = castToCodeableConcept(value); // CodeableConcept
904        else if (name.equals("period"))
905          this.period = castToPeriod(value); // Period
906        else if (name.equals("issuer"))
907          this.issuer = castToReference(value); // Reference
908        else
909          super.setProperty(name, value);
910      }
911
912      @Override
913      public Base makeProperty(int hash, String name) throws FHIRException {
914        switch (hash) {
915        case -1618432855:  return addIdentifier(); // Identifier
916        case 3059181:  return getCode(); // CodeableConcept
917        case -991726143:  return getPeriod(); // Period
918        case -1179159879:  return getIssuer(); // Reference
919        default: return super.makeProperty(hash, name);
920        }
921
922      }
923
924      @Override
925      public Base addChild(String name) throws FHIRException {
926        if (name.equals("identifier")) {
927          return addIdentifier();
928        }
929        else if (name.equals("code")) {
930          this.code = new CodeableConcept();
931          return this.code;
932        }
933        else if (name.equals("period")) {
934          this.period = new Period();
935          return this.period;
936        }
937        else if (name.equals("issuer")) {
938          this.issuer = new Reference();
939          return this.issuer;
940        }
941        else
942          return super.addChild(name);
943      }
944
945      public PractitionerQualificationComponent copy() {
946        PractitionerQualificationComponent dst = new PractitionerQualificationComponent();
947        copyValues(dst);
948        if (identifier != null) {
949          dst.identifier = new ArrayList<Identifier>();
950          for (Identifier i : identifier)
951            dst.identifier.add(i.copy());
952        };
953        dst.code = code == null ? null : code.copy();
954        dst.period = period == null ? null : period.copy();
955        dst.issuer = issuer == null ? null : issuer.copy();
956        return dst;
957      }
958
959      @Override
960      public boolean equalsDeep(Base other) {
961        if (!super.equalsDeep(other))
962          return false;
963        if (!(other instanceof PractitionerQualificationComponent))
964          return false;
965        PractitionerQualificationComponent o = (PractitionerQualificationComponent) other;
966        return compareDeep(identifier, o.identifier, true) && compareDeep(code, o.code, true) && compareDeep(period, o.period, true)
967           && compareDeep(issuer, o.issuer, true);
968      }
969
970      @Override
971      public boolean equalsShallow(Base other) {
972        if (!super.equalsShallow(other))
973          return false;
974        if (!(other instanceof PractitionerQualificationComponent))
975          return false;
976        PractitionerQualificationComponent o = (PractitionerQualificationComponent) other;
977        return true;
978      }
979
980      public boolean isEmpty() {
981        return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (code == null || code.isEmpty())
982           && (period == null || period.isEmpty()) && (issuer == null || issuer.isEmpty());
983      }
984
985  public String fhirType() {
986    return "Practitioner.qualification";
987
988  }
989
990  }
991
992    /**
993     * An identifier that applies to this person in this role.
994     */
995    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
996    @Description(shortDefinition="A identifier for the person as this agent", formalDefinition="An identifier that applies to this person in this role." )
997    protected List<Identifier> identifier;
998
999    /**
1000     * Whether this practitioner's record is in active use.
1001     */
1002    @Child(name = "active", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=true)
1003    @Description(shortDefinition="Whether this practitioner's record is in active use", formalDefinition="Whether this practitioner's record is in active use." )
1004    protected BooleanType active;
1005
1006    /**
1007     * The name(s) associated with the practitioner.
1008     */
1009    @Child(name = "name", type = {HumanName.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1010    @Description(shortDefinition="The name(s) associated with the practitioner", formalDefinition="The name(s) associated with the practitioner." )
1011    protected List<HumanName> name;
1012
1013    /**
1014     * A contact detail for the practitioner, e.g. a telephone number or an email address.
1015     */
1016    @Child(name = "telecom", type = {ContactPoint.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1017    @Description(shortDefinition="A contact detail for the practitioner (that apply to all roles)", formalDefinition="A contact detail for the practitioner, e.g. a telephone number or an email address." )
1018    protected List<ContactPoint> telecom;
1019
1020    /**
1021     * Address(es) of the practitioner that are not role specific (typically home address). 
1022Work addresses are not typically entered in this property as they are usually role dependent.
1023     */
1024    @Child(name = "address", type = {Address.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1025    @Description(shortDefinition="Address(es) of the practitioner that are not role specific (typically home address)", formalDefinition="Address(es) of the practitioner that are not role specific (typically home address). \nWork addresses are not typically entered in this property as they are usually role dependent." )
1026    protected List<Address> address;
1027
1028    /**
1029     * Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
1030     */
1031    @Child(name = "gender", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=true)
1032    @Description(shortDefinition="male | female | other | unknown", formalDefinition="Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes." )
1033    protected Enumeration<AdministrativeGender> gender;
1034
1035    /**
1036     * The date of birth for the practitioner.
1037     */
1038    @Child(name = "birthDate", type = {DateType.class}, order=6, min=0, max=1, modifier=false, summary=true)
1039    @Description(shortDefinition="The date  on which the practitioner was born", formalDefinition="The date of birth for the practitioner." )
1040    protected DateType birthDate;
1041
1042    /**
1043     * Image of the person.
1044     */
1045    @Child(name = "photo", type = {Attachment.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1046    @Description(shortDefinition="Image of the person", formalDefinition="Image of the person." )
1047    protected List<Attachment> photo;
1048
1049    /**
1050     * The list of roles/organizations that the practitioner is associated with.
1051     */
1052    @Child(name = "practitionerRole", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1053    @Description(shortDefinition="Roles/organizations the practitioner is associated with", formalDefinition="The list of roles/organizations that the practitioner is associated with." )
1054    protected List<PractitionerPractitionerRoleComponent> practitionerRole;
1055
1056    /**
1057     * Qualifications obtained by training and certification.
1058     */
1059    @Child(name = "qualification", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1060    @Description(shortDefinition="Qualifications obtained by training and certification", formalDefinition="Qualifications obtained by training and certification." )
1061    protected List<PractitionerQualificationComponent> qualification;
1062
1063    /**
1064     * A language the practitioner is able to use in patient communication.
1065     */
1066    @Child(name = "communication", type = {CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1067    @Description(shortDefinition="A language the practitioner is able to use in patient communication", formalDefinition="A language the practitioner is able to use in patient communication." )
1068    protected List<CodeableConcept> communication;
1069
1070    private static final long serialVersionUID = 2137859974L;
1071
1072  /**
1073   * Constructor
1074   */
1075    public Practitioner() {
1076      super();
1077    }
1078
1079    /**
1080     * @return {@link #identifier} (An identifier that applies to this person in this role.)
1081     */
1082    public List<Identifier> getIdentifier() { 
1083      if (this.identifier == null)
1084        this.identifier = new ArrayList<Identifier>();
1085      return this.identifier;
1086    }
1087
1088    public boolean hasIdentifier() { 
1089      if (this.identifier == null)
1090        return false;
1091      for (Identifier item : this.identifier)
1092        if (!item.isEmpty())
1093          return true;
1094      return false;
1095    }
1096
1097    /**
1098     * @return {@link #identifier} (An identifier that applies to this person in this role.)
1099     */
1100    // syntactic sugar
1101    public Identifier addIdentifier() { //3
1102      Identifier t = new Identifier();
1103      if (this.identifier == null)
1104        this.identifier = new ArrayList<Identifier>();
1105      this.identifier.add(t);
1106      return t;
1107    }
1108
1109    // syntactic sugar
1110    public Practitioner addIdentifier(Identifier t) { //3
1111      if (t == null)
1112        return this;
1113      if (this.identifier == null)
1114        this.identifier = new ArrayList<Identifier>();
1115      this.identifier.add(t);
1116      return this;
1117    }
1118
1119    /**
1120     * @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
1121     */
1122    public BooleanType getActiveElement() { 
1123      if (this.active == null)
1124        if (Configuration.errorOnAutoCreate())
1125          throw new Error("Attempt to auto-create Practitioner.active");
1126        else if (Configuration.doAutoCreate())
1127          this.active = new BooleanType(); // bb
1128      return this.active;
1129    }
1130
1131    public boolean hasActiveElement() { 
1132      return this.active != null && !this.active.isEmpty();
1133    }
1134
1135    public boolean hasActive() { 
1136      return this.active != null && !this.active.isEmpty();
1137    }
1138
1139    /**
1140     * @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
1141     */
1142    public Practitioner setActiveElement(BooleanType value) { 
1143      this.active = value;
1144      return this;
1145    }
1146
1147    /**
1148     * @return Whether this practitioner's record is in active use.
1149     */
1150    public boolean getActive() { 
1151      return this.active == null || this.active.isEmpty() ? false : this.active.getValue();
1152    }
1153
1154    /**
1155     * @param value Whether this practitioner's record is in active use.
1156     */
1157    public Practitioner setActive(boolean value) { 
1158        if (this.active == null)
1159          this.active = new BooleanType();
1160        this.active.setValue(value);
1161      return this;
1162    }
1163
1164    /**
1165     * @return {@link #name} (The name(s) associated with the practitioner.)
1166     */
1167    public List<HumanName> getName() { 
1168      if (this.name == null)
1169        this.name = new ArrayList<HumanName>();
1170      return this.name;
1171    }
1172
1173    public boolean hasName() { 
1174      if (this.name == null)
1175        return false;
1176      for (HumanName item : this.name)
1177        if (!item.isEmpty())
1178          return true;
1179      return false;
1180    }
1181
1182    /**
1183     * @return {@link #name} (The name(s) associated with the practitioner.)
1184     */
1185    // syntactic sugar
1186    public HumanName addName() { //3
1187      HumanName t = new HumanName();
1188      if (this.name == null)
1189        this.name = new ArrayList<HumanName>();
1190      this.name.add(t);
1191      return t;
1192    }
1193
1194    // syntactic sugar
1195    public Practitioner addName(HumanName t) { //3
1196      if (t == null)
1197        return this;
1198      if (this.name == null)
1199        this.name = new ArrayList<HumanName>();
1200      this.name.add(t);
1201      return this;
1202    }
1203
1204    /**
1205     * @return {@link #telecom} (A contact detail for the practitioner, e.g. a telephone number or an email address.)
1206     */
1207    public List<ContactPoint> getTelecom() { 
1208      if (this.telecom == null)
1209        this.telecom = new ArrayList<ContactPoint>();
1210      return this.telecom;
1211    }
1212
1213    public boolean hasTelecom() { 
1214      if (this.telecom == null)
1215        return false;
1216      for (ContactPoint item : this.telecom)
1217        if (!item.isEmpty())
1218          return true;
1219      return false;
1220    }
1221
1222    /**
1223     * @return {@link #telecom} (A contact detail for the practitioner, e.g. a telephone number or an email address.)
1224     */
1225    // syntactic sugar
1226    public ContactPoint addTelecom() { //3
1227      ContactPoint t = new ContactPoint();
1228      if (this.telecom == null)
1229        this.telecom = new ArrayList<ContactPoint>();
1230      this.telecom.add(t);
1231      return t;
1232    }
1233
1234    // syntactic sugar
1235    public Practitioner addTelecom(ContactPoint t) { //3
1236      if (t == null)
1237        return this;
1238      if (this.telecom == null)
1239        this.telecom = new ArrayList<ContactPoint>();
1240      this.telecom.add(t);
1241      return this;
1242    }
1243
1244    /**
1245     * @return {@link #address} (Address(es) of the practitioner that are not role specific (typically home address). 
1246Work addresses are not typically entered in this property as they are usually role dependent.)
1247     */
1248    public List<Address> getAddress() { 
1249      if (this.address == null)
1250        this.address = new ArrayList<Address>();
1251      return this.address;
1252    }
1253
1254    public boolean hasAddress() { 
1255      if (this.address == null)
1256        return false;
1257      for (Address item : this.address)
1258        if (!item.isEmpty())
1259          return true;
1260      return false;
1261    }
1262
1263    /**
1264     * @return {@link #address} (Address(es) of the practitioner that are not role specific (typically home address). 
1265Work addresses are not typically entered in this property as they are usually role dependent.)
1266     */
1267    // syntactic sugar
1268    public Address addAddress() { //3
1269      Address t = new Address();
1270      if (this.address == null)
1271        this.address = new ArrayList<Address>();
1272      this.address.add(t);
1273      return t;
1274    }
1275
1276    // syntactic sugar
1277    public Practitioner addAddress(Address t) { //3
1278      if (t == null)
1279        return this;
1280      if (this.address == null)
1281        this.address = new ArrayList<Address>();
1282      this.address.add(t);
1283      return this;
1284    }
1285
1286    /**
1287     * @return {@link #gender} (Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.). This is the underlying object with id, value and extensions. The accessor "getGender" gives direct access to the value
1288     */
1289    public Enumeration<AdministrativeGender> getGenderElement() { 
1290      if (this.gender == null)
1291        if (Configuration.errorOnAutoCreate())
1292          throw new Error("Attempt to auto-create Practitioner.gender");
1293        else if (Configuration.doAutoCreate())
1294          this.gender = new Enumeration<AdministrativeGender>(new AdministrativeGenderEnumFactory()); // bb
1295      return this.gender;
1296    }
1297
1298    public boolean hasGenderElement() { 
1299      return this.gender != null && !this.gender.isEmpty();
1300    }
1301
1302    public boolean hasGender() { 
1303      return this.gender != null && !this.gender.isEmpty();
1304    }
1305
1306    /**
1307     * @param value {@link #gender} (Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.). This is the underlying object with id, value and extensions. The accessor "getGender" gives direct access to the value
1308     */
1309    public Practitioner setGenderElement(Enumeration<AdministrativeGender> value) { 
1310      this.gender = value;
1311      return this;
1312    }
1313
1314    /**
1315     * @return Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
1316     */
1317    public AdministrativeGender getGender() { 
1318      return this.gender == null ? null : this.gender.getValue();
1319    }
1320
1321    /**
1322     * @param value Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
1323     */
1324    public Practitioner setGender(AdministrativeGender value) { 
1325      if (value == null)
1326        this.gender = null;
1327      else {
1328        if (this.gender == null)
1329          this.gender = new Enumeration<AdministrativeGender>(new AdministrativeGenderEnumFactory());
1330        this.gender.setValue(value);
1331      }
1332      return this;
1333    }
1334
1335    /**
1336     * @return {@link #birthDate} (The date of birth for the practitioner.). This is the underlying object with id, value and extensions. The accessor "getBirthDate" gives direct access to the value
1337     */
1338    public DateType getBirthDateElement() { 
1339      if (this.birthDate == null)
1340        if (Configuration.errorOnAutoCreate())
1341          throw new Error("Attempt to auto-create Practitioner.birthDate");
1342        else if (Configuration.doAutoCreate())
1343          this.birthDate = new DateType(); // bb
1344      return this.birthDate;
1345    }
1346
1347    public boolean hasBirthDateElement() { 
1348      return this.birthDate != null && !this.birthDate.isEmpty();
1349    }
1350
1351    public boolean hasBirthDate() { 
1352      return this.birthDate != null && !this.birthDate.isEmpty();
1353    }
1354
1355    /**
1356     * @param value {@link #birthDate} (The date of birth for the practitioner.). This is the underlying object with id, value and extensions. The accessor "getBirthDate" gives direct access to the value
1357     */
1358    public Practitioner setBirthDateElement(DateType value) { 
1359      this.birthDate = value;
1360      return this;
1361    }
1362
1363    /**
1364     * @return The date of birth for the practitioner.
1365     */
1366    public Date getBirthDate() { 
1367      return this.birthDate == null ? null : this.birthDate.getValue();
1368    }
1369
1370    /**
1371     * @param value The date of birth for the practitioner.
1372     */
1373    public Practitioner setBirthDate(Date value) { 
1374      if (value == null)
1375        this.birthDate = null;
1376      else {
1377        if (this.birthDate == null)
1378          this.birthDate = new DateType();
1379        this.birthDate.setValue(value);
1380      }
1381      return this;
1382    }
1383
1384    /**
1385     * @return {@link #photo} (Image of the person.)
1386     */
1387    public List<Attachment> getPhoto() { 
1388      if (this.photo == null)
1389        this.photo = new ArrayList<Attachment>();
1390      return this.photo;
1391    }
1392
1393    public boolean hasPhoto() { 
1394      if (this.photo == null)
1395        return false;
1396      for (Attachment item : this.photo)
1397        if (!item.isEmpty())
1398          return true;
1399      return false;
1400    }
1401
1402    /**
1403     * @return {@link #photo} (Image of the person.)
1404     */
1405    // syntactic sugar
1406    public Attachment addPhoto() { //3
1407      Attachment t = new Attachment();
1408      if (this.photo == null)
1409        this.photo = new ArrayList<Attachment>();
1410      this.photo.add(t);
1411      return t;
1412    }
1413
1414    // syntactic sugar
1415    public Practitioner addPhoto(Attachment t) { //3
1416      if (t == null)
1417        return this;
1418      if (this.photo == null)
1419        this.photo = new ArrayList<Attachment>();
1420      this.photo.add(t);
1421      return this;
1422    }
1423
1424    /**
1425     * @return {@link #practitionerRole} (The list of roles/organizations that the practitioner is associated with.)
1426     */
1427    public List<PractitionerPractitionerRoleComponent> getPractitionerRole() { 
1428      if (this.practitionerRole == null)
1429        this.practitionerRole = new ArrayList<PractitionerPractitionerRoleComponent>();
1430      return this.practitionerRole;
1431    }
1432
1433    public boolean hasPractitionerRole() { 
1434      if (this.practitionerRole == null)
1435        return false;
1436      for (PractitionerPractitionerRoleComponent item : this.practitionerRole)
1437        if (!item.isEmpty())
1438          return true;
1439      return false;
1440    }
1441
1442    /**
1443     * @return {@link #practitionerRole} (The list of roles/organizations that the practitioner is associated with.)
1444     */
1445    // syntactic sugar
1446    public PractitionerPractitionerRoleComponent addPractitionerRole() { //3
1447      PractitionerPractitionerRoleComponent t = new PractitionerPractitionerRoleComponent();
1448      if (this.practitionerRole == null)
1449        this.practitionerRole = new ArrayList<PractitionerPractitionerRoleComponent>();
1450      this.practitionerRole.add(t);
1451      return t;
1452    }
1453
1454    // syntactic sugar
1455    public Practitioner addPractitionerRole(PractitionerPractitionerRoleComponent t) { //3
1456      if (t == null)
1457        return this;
1458      if (this.practitionerRole == null)
1459        this.practitionerRole = new ArrayList<PractitionerPractitionerRoleComponent>();
1460      this.practitionerRole.add(t);
1461      return this;
1462    }
1463
1464    /**
1465     * @return {@link #qualification} (Qualifications obtained by training and certification.)
1466     */
1467    public List<PractitionerQualificationComponent> getQualification() { 
1468      if (this.qualification == null)
1469        this.qualification = new ArrayList<PractitionerQualificationComponent>();
1470      return this.qualification;
1471    }
1472
1473    public boolean hasQualification() { 
1474      if (this.qualification == null)
1475        return false;
1476      for (PractitionerQualificationComponent item : this.qualification)
1477        if (!item.isEmpty())
1478          return true;
1479      return false;
1480    }
1481
1482    /**
1483     * @return {@link #qualification} (Qualifications obtained by training and certification.)
1484     */
1485    // syntactic sugar
1486    public PractitionerQualificationComponent addQualification() { //3
1487      PractitionerQualificationComponent t = new PractitionerQualificationComponent();
1488      if (this.qualification == null)
1489        this.qualification = new ArrayList<PractitionerQualificationComponent>();
1490      this.qualification.add(t);
1491      return t;
1492    }
1493
1494    // syntactic sugar
1495    public Practitioner addQualification(PractitionerQualificationComponent t) { //3
1496      if (t == null)
1497        return this;
1498      if (this.qualification == null)
1499        this.qualification = new ArrayList<PractitionerQualificationComponent>();
1500      this.qualification.add(t);
1501      return this;
1502    }
1503
1504    /**
1505     * @return {@link #communication} (A language the practitioner is able to use in patient communication.)
1506     */
1507    public List<CodeableConcept> getCommunication() { 
1508      if (this.communication == null)
1509        this.communication = new ArrayList<CodeableConcept>();
1510      return this.communication;
1511    }
1512
1513    public boolean hasCommunication() { 
1514      if (this.communication == null)
1515        return false;
1516      for (CodeableConcept item : this.communication)
1517        if (!item.isEmpty())
1518          return true;
1519      return false;
1520    }
1521
1522    /**
1523     * @return {@link #communication} (A language the practitioner is able to use in patient communication.)
1524     */
1525    // syntactic sugar
1526    public CodeableConcept addCommunication() { //3
1527      CodeableConcept t = new CodeableConcept();
1528      if (this.communication == null)
1529        this.communication = new ArrayList<CodeableConcept>();
1530      this.communication.add(t);
1531      return t;
1532    }
1533
1534    // syntactic sugar
1535    public Practitioner addCommunication(CodeableConcept t) { //3
1536      if (t == null)
1537        return this;
1538      if (this.communication == null)
1539        this.communication = new ArrayList<CodeableConcept>();
1540      this.communication.add(t);
1541      return this;
1542    }
1543
1544      protected void listChildren(List<Property> childrenList) {
1545        super.listChildren(childrenList);
1546        childrenList.add(new Property("identifier", "Identifier", "An identifier that applies to this person in this role.", 0, java.lang.Integer.MAX_VALUE, identifier));
1547        childrenList.add(new Property("active", "boolean", "Whether this practitioner's record is in active use.", 0, java.lang.Integer.MAX_VALUE, active));
1548        childrenList.add(new Property("name", "HumanName", "The name(s) associated with the practitioner.", 0, java.lang.Integer.MAX_VALUE, name));
1549        childrenList.add(new Property("telecom", "ContactPoint", "A contact detail for the practitioner, e.g. a telephone number or an email address.", 0, java.lang.Integer.MAX_VALUE, telecom));
1550        childrenList.add(new Property("address", "Address", "Address(es) of the practitioner that are not role specific (typically home address). \nWork addresses are not typically entered in this property as they are usually role dependent.", 0, java.lang.Integer.MAX_VALUE, address));
1551        childrenList.add(new Property("gender", "code", "Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.", 0, java.lang.Integer.MAX_VALUE, gender));
1552        childrenList.add(new Property("birthDate", "date", "The date of birth for the practitioner.", 0, java.lang.Integer.MAX_VALUE, birthDate));
1553        childrenList.add(new Property("photo", "Attachment", "Image of the person.", 0, java.lang.Integer.MAX_VALUE, photo));
1554        childrenList.add(new Property("practitionerRole", "", "The list of roles/organizations that the practitioner is associated with.", 0, java.lang.Integer.MAX_VALUE, practitionerRole));
1555        childrenList.add(new Property("qualification", "", "Qualifications obtained by training and certification.", 0, java.lang.Integer.MAX_VALUE, qualification));
1556        childrenList.add(new Property("communication", "CodeableConcept", "A language the practitioner is able to use in patient communication.", 0, java.lang.Integer.MAX_VALUE, communication));
1557      }
1558
1559      @Override
1560      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1561        switch (hash) {
1562        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1563        case -1422950650: /*active*/ return this.active == null ? new Base[0] : new Base[] {this.active}; // BooleanType
1564        case 3373707: /*name*/ return this.name == null ? new Base[0] : this.name.toArray(new Base[this.name.size()]); // HumanName
1565        case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint
1566        case -1147692044: /*address*/ return this.address == null ? new Base[0] : this.address.toArray(new Base[this.address.size()]); // Address
1567        case -1249512767: /*gender*/ return this.gender == null ? new Base[0] : new Base[] {this.gender}; // Enumeration<AdministrativeGender>
1568        case -1210031859: /*birthDate*/ return this.birthDate == null ? new Base[0] : new Base[] {this.birthDate}; // DateType
1569        case 106642994: /*photo*/ return this.photo == null ? new Base[0] : this.photo.toArray(new Base[this.photo.size()]); // Attachment
1570        case 221717168: /*practitionerRole*/ return this.practitionerRole == null ? new Base[0] : this.practitionerRole.toArray(new Base[this.practitionerRole.size()]); // PractitionerPractitionerRoleComponent
1571        case -631333393: /*qualification*/ return this.qualification == null ? new Base[0] : this.qualification.toArray(new Base[this.qualification.size()]); // PractitionerQualificationComponent
1572        case -1035284522: /*communication*/ return this.communication == null ? new Base[0] : this.communication.toArray(new Base[this.communication.size()]); // CodeableConcept
1573        default: return super.getProperty(hash, name, checkValid);
1574        }
1575
1576      }
1577
1578      @Override
1579      public void setProperty(int hash, String name, Base value) throws FHIRException {
1580        switch (hash) {
1581        case -1618432855: // identifier
1582          this.getIdentifier().add(castToIdentifier(value)); // Identifier
1583          break;
1584        case -1422950650: // active
1585          this.active = castToBoolean(value); // BooleanType
1586          break;
1587        case 3373707: // name
1588          this.getName().add(castToHumanName(value)); // HumanName
1589          break;
1590        case -1429363305: // telecom
1591          this.getTelecom().add(castToContactPoint(value)); // ContactPoint
1592          break;
1593        case -1147692044: // address
1594          this.getAddress().add(castToAddress(value)); // Address
1595          break;
1596        case -1249512767: // gender
1597          this.gender = new AdministrativeGenderEnumFactory().fromType(value); // Enumeration<AdministrativeGender>
1598          break;
1599        case -1210031859: // birthDate
1600          this.birthDate = castToDate(value); // DateType
1601          break;
1602        case 106642994: // photo
1603          this.getPhoto().add(castToAttachment(value)); // Attachment
1604          break;
1605        case 221717168: // practitionerRole
1606          this.getPractitionerRole().add((PractitionerPractitionerRoleComponent) value); // PractitionerPractitionerRoleComponent
1607          break;
1608        case -631333393: // qualification
1609          this.getQualification().add((PractitionerQualificationComponent) value); // PractitionerQualificationComponent
1610          break;
1611        case -1035284522: // communication
1612          this.getCommunication().add(castToCodeableConcept(value)); // CodeableConcept
1613          break;
1614        default: super.setProperty(hash, name, value);
1615        }
1616
1617      }
1618
1619      @Override
1620      public void setProperty(String name, Base value) throws FHIRException {
1621        if (name.equals("identifier"))
1622          this.getIdentifier().add(castToIdentifier(value));
1623        else if (name.equals("active"))
1624          this.active = castToBoolean(value); // BooleanType
1625        else if (name.equals("name"))
1626          this.getName().add(castToHumanName(value));
1627        else if (name.equals("telecom"))
1628          this.getTelecom().add(castToContactPoint(value));
1629        else if (name.equals("address"))
1630          this.getAddress().add(castToAddress(value));
1631        else if (name.equals("gender"))
1632          this.gender = new AdministrativeGenderEnumFactory().fromType(value); // Enumeration<AdministrativeGender>
1633        else if (name.equals("birthDate"))
1634          this.birthDate = castToDate(value); // DateType
1635        else if (name.equals("photo"))
1636          this.getPhoto().add(castToAttachment(value));
1637        else if (name.equals("practitionerRole"))
1638          this.getPractitionerRole().add((PractitionerPractitionerRoleComponent) value);
1639        else if (name.equals("qualification"))
1640          this.getQualification().add((PractitionerQualificationComponent) value);
1641        else if (name.equals("communication"))
1642          this.getCommunication().add(castToCodeableConcept(value));
1643        else
1644          super.setProperty(name, value);
1645      }
1646
1647      @Override
1648      public Base makeProperty(int hash, String name) throws FHIRException {
1649        switch (hash) {
1650        case -1618432855:  return addIdentifier(); // Identifier
1651        case -1422950650: throw new FHIRException("Cannot make property active as it is not a complex type"); // BooleanType
1652        case 3373707:  return addName(); // HumanName
1653        case -1429363305:  return addTelecom(); // ContactPoint
1654        case -1147692044:  return addAddress(); // Address
1655        case -1249512767: throw new FHIRException("Cannot make property gender as it is not a complex type"); // Enumeration<AdministrativeGender>
1656        case -1210031859: throw new FHIRException("Cannot make property birthDate as it is not a complex type"); // DateType
1657        case 106642994:  return addPhoto(); // Attachment
1658        case 221717168:  return addPractitionerRole(); // PractitionerPractitionerRoleComponent
1659        case -631333393:  return addQualification(); // PractitionerQualificationComponent
1660        case -1035284522:  return addCommunication(); // CodeableConcept
1661        default: return super.makeProperty(hash, name);
1662        }
1663
1664      }
1665
1666      @Override
1667      public Base addChild(String name) throws FHIRException {
1668        if (name.equals("identifier")) {
1669          return addIdentifier();
1670        }
1671        else if (name.equals("active")) {
1672          throw new FHIRException("Cannot call addChild on a primitive type Practitioner.active");
1673        }
1674        else if (name.equals("name")) {
1675          return addName();
1676        }
1677        else if (name.equals("telecom")) {
1678          return addTelecom();
1679        }
1680        else if (name.equals("address")) {
1681          return addAddress();
1682        }
1683        else if (name.equals("gender")) {
1684          throw new FHIRException("Cannot call addChild on a primitive type Practitioner.gender");
1685        }
1686        else if (name.equals("birthDate")) {
1687          throw new FHIRException("Cannot call addChild on a primitive type Practitioner.birthDate");
1688        }
1689        else if (name.equals("photo")) {
1690          return addPhoto();
1691        }
1692        else if (name.equals("practitionerRole")) {
1693          return addPractitionerRole();
1694        }
1695        else if (name.equals("qualification")) {
1696          return addQualification();
1697        }
1698        else if (name.equals("communication")) {
1699          return addCommunication();
1700        }
1701        else
1702          return super.addChild(name);
1703      }
1704
1705  public String fhirType() {
1706    return "Practitioner";
1707
1708  }
1709
1710      public Practitioner copy() {
1711        Practitioner dst = new Practitioner();
1712        copyValues(dst);
1713        if (identifier != null) {
1714          dst.identifier = new ArrayList<Identifier>();
1715          for (Identifier i : identifier)
1716            dst.identifier.add(i.copy());
1717        };
1718        dst.active = active == null ? null : active.copy();
1719        if (name != null) {
1720          dst.name = new ArrayList<HumanName>();
1721          for (HumanName i : name)
1722            dst.name.add(i.copy());
1723        };
1724        if (telecom != null) {
1725          dst.telecom = new ArrayList<ContactPoint>();
1726          for (ContactPoint i : telecom)
1727            dst.telecom.add(i.copy());
1728        };
1729        if (address != null) {
1730          dst.address = new ArrayList<Address>();
1731          for (Address i : address)
1732            dst.address.add(i.copy());
1733        };
1734        dst.gender = gender == null ? null : gender.copy();
1735        dst.birthDate = birthDate == null ? null : birthDate.copy();
1736        if (photo != null) {
1737          dst.photo = new ArrayList<Attachment>();
1738          for (Attachment i : photo)
1739            dst.photo.add(i.copy());
1740        };
1741        if (practitionerRole != null) {
1742          dst.practitionerRole = new ArrayList<PractitionerPractitionerRoleComponent>();
1743          for (PractitionerPractitionerRoleComponent i : practitionerRole)
1744            dst.practitionerRole.add(i.copy());
1745        };
1746        if (qualification != null) {
1747          dst.qualification = new ArrayList<PractitionerQualificationComponent>();
1748          for (PractitionerQualificationComponent i : qualification)
1749            dst.qualification.add(i.copy());
1750        };
1751        if (communication != null) {
1752          dst.communication = new ArrayList<CodeableConcept>();
1753          for (CodeableConcept i : communication)
1754            dst.communication.add(i.copy());
1755        };
1756        return dst;
1757      }
1758
1759      protected Practitioner typedCopy() {
1760        return copy();
1761      }
1762
1763      @Override
1764      public boolean equalsDeep(Base other) {
1765        if (!super.equalsDeep(other))
1766          return false;
1767        if (!(other instanceof Practitioner))
1768          return false;
1769        Practitioner o = (Practitioner) other;
1770        return compareDeep(identifier, o.identifier, true) && compareDeep(active, o.active, true) && compareDeep(name, o.name, true)
1771           && compareDeep(telecom, o.telecom, true) && compareDeep(address, o.address, true) && compareDeep(gender, o.gender, true)
1772           && compareDeep(birthDate, o.birthDate, true) && compareDeep(photo, o.photo, true) && compareDeep(practitionerRole, o.practitionerRole, true)
1773           && compareDeep(qualification, o.qualification, true) && compareDeep(communication, o.communication, true)
1774          ;
1775      }
1776
1777      @Override
1778      public boolean equalsShallow(Base other) {
1779        if (!super.equalsShallow(other))
1780          return false;
1781        if (!(other instanceof Practitioner))
1782          return false;
1783        Practitioner o = (Practitioner) other;
1784        return compareValues(active, o.active, true) && compareValues(gender, o.gender, true) && compareValues(birthDate, o.birthDate, true)
1785          ;
1786      }
1787
1788      public boolean isEmpty() {
1789        return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (active == null || active.isEmpty())
1790           && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) && (address == null || address.isEmpty())
1791           && (gender == null || gender.isEmpty()) && (birthDate == null || birthDate.isEmpty()) && (photo == null || photo.isEmpty())
1792           && (practitionerRole == null || practitionerRole.isEmpty()) && (qualification == null || qualification.isEmpty())
1793           && (communication == null || communication.isEmpty());
1794      }
1795
1796  @Override
1797  public ResourceType getResourceType() {
1798    return ResourceType.Practitioner;
1799   }
1800
1801 /**
1802   * Search parameter: <b>phone</b>
1803   * <p>
1804   * Description: <b>A value in a phone contact</b><br>
1805   * Type: <b>token</b><br>
1806   * Path: <b>Practitioner.telecom(system=phone), Practitioner.practitionerRole.telecom(system=phone)</b><br>
1807   * </p>
1808   */
1809  @SearchParamDefinition(name="phone", path="Practitioner.telecom.where(system='phone') or Practitioner.practitionerRole.telecom.where(system='phone')", description="A value in a phone contact", type="token" )
1810  public static final String SP_PHONE = "phone";
1811 /**
1812   * <b>Fluent Client</b> search parameter constant for <b>phone</b>
1813   * <p>
1814   * Description: <b>A value in a phone contact</b><br>
1815   * Type: <b>token</b><br>
1816   * Path: <b>Practitioner.telecom(system=phone), Practitioner.practitionerRole.telecom(system=phone)</b><br>
1817   * </p>
1818   */
1819  public static final ca.uhn.fhir.rest.gclient.TokenClientParam PHONE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PHONE);
1820
1821 /**
1822   * Search parameter: <b>phonetic</b>
1823   * <p>
1824   * Description: <b>A portion of either family or given name using some kind of phonetic matching algorithm</b><br>
1825   * Type: <b>string</b><br>
1826   * Path: <b>Practitioner.name</b><br>
1827   * </p>
1828   */
1829  @SearchParamDefinition(name="phonetic", path="Practitioner.name", description="A portion of either family or given name using some kind of phonetic matching algorithm", type="string" )
1830  public static final String SP_PHONETIC = "phonetic";
1831 /**
1832   * <b>Fluent Client</b> search parameter constant for <b>phonetic</b>
1833   * <p>
1834   * Description: <b>A portion of either family or given name using some kind of phonetic matching algorithm</b><br>
1835   * Type: <b>string</b><br>
1836   * Path: <b>Practitioner.name</b><br>
1837   * </p>
1838   */
1839  public static final ca.uhn.fhir.rest.gclient.StringClientParam PHONETIC = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PHONETIC);
1840
1841 /**
1842   * Search parameter: <b>location</b>
1843   * <p>
1844   * Description: <b>One of the locations at which this practitioner provides care</b><br>
1845   * Type: <b>reference</b><br>
1846   * Path: <b>Practitioner.practitionerRole.location</b><br>
1847   * </p>
1848   */
1849  @SearchParamDefinition(name="location", path="Practitioner.practitionerRole.location", description="One of the locations at which this practitioner provides care", type="reference" )
1850  public static final String SP_LOCATION = "location";
1851 /**
1852   * <b>Fluent Client</b> search parameter constant for <b>location</b>
1853   * <p>
1854   * Description: <b>One of the locations at which this practitioner provides care</b><br>
1855   * Type: <b>reference</b><br>
1856   * Path: <b>Practitioner.practitionerRole.location</b><br>
1857   * </p>
1858   */
1859  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam LOCATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_LOCATION);
1860
1861/**
1862   * Constant for fluent queries to be used to add include statements. Specifies
1863   * the path value of "<b>Practitioner:location</b>".
1864   */
1865  public static final ca.uhn.fhir.model.api.Include INCLUDE_LOCATION = new ca.uhn.fhir.model.api.Include("Practitioner:location").toLocked();
1866
1867 /**
1868   * Search parameter: <b>communication</b>
1869   * <p>
1870   * Description: <b>One of the languages that the practitioner can communicate with</b><br>
1871   * Type: <b>token</b><br>
1872   * Path: <b>Practitioner.communication</b><br>
1873   * </p>
1874   */
1875  @SearchParamDefinition(name="communication", path="Practitioner.communication", description="One of the languages that the practitioner can communicate with", type="token" )
1876  public static final String SP_COMMUNICATION = "communication";
1877 /**
1878   * <b>Fluent Client</b> search parameter constant for <b>communication</b>
1879   * <p>
1880   * Description: <b>One of the languages that the practitioner can communicate with</b><br>
1881   * Type: <b>token</b><br>
1882   * Path: <b>Practitioner.communication</b><br>
1883   * </p>
1884   */
1885  public static final ca.uhn.fhir.rest.gclient.TokenClientParam COMMUNICATION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_COMMUNICATION);
1886
1887 /**
1888   * Search parameter: <b>address-country</b>
1889   * <p>
1890   * Description: <b>A country specified in an address</b><br>
1891   * Type: <b>string</b><br>
1892   * Path: <b>Practitioner.address.country</b><br>
1893   * </p>
1894   */
1895  @SearchParamDefinition(name="address-country", path="Practitioner.address.country", description="A country specified in an address", type="string" )
1896  public static final String SP_ADDRESS_COUNTRY = "address-country";
1897 /**
1898   * <b>Fluent Client</b> search parameter constant for <b>address-country</b>
1899   * <p>
1900   * Description: <b>A country specified in an address</b><br>
1901   * Type: <b>string</b><br>
1902   * Path: <b>Practitioner.address.country</b><br>
1903   * </p>
1904   */
1905  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_COUNTRY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_COUNTRY);
1906
1907 /**
1908   * Search parameter: <b>organization</b>
1909   * <p>
1910   * Description: <b>The identity of the organization the practitioner represents / acts on behalf of</b><br>
1911   * Type: <b>reference</b><br>
1912   * Path: <b>Practitioner.practitionerRole.organization</b><br>
1913   * </p>
1914   */
1915  @SearchParamDefinition(name="organization", path="Practitioner.practitionerRole.organization", description="The identity of the organization the practitioner represents / acts on behalf of", type="reference" )
1916  public static final String SP_ORGANIZATION = "organization";
1917 /**
1918   * <b>Fluent Client</b> search parameter constant for <b>organization</b>
1919   * <p>
1920   * Description: <b>The identity of the organization the practitioner represents / acts on behalf of</b><br>
1921   * Type: <b>reference</b><br>
1922   * Path: <b>Practitioner.practitionerRole.organization</b><br>
1923   * </p>
1924   */
1925  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION);
1926
1927/**
1928   * Constant for fluent queries to be used to add include statements. Specifies
1929   * the path value of "<b>Practitioner:organization</b>".
1930   */
1931  public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("Practitioner:organization").toLocked();
1932
1933 /**
1934   * Search parameter: <b>address-city</b>
1935   * <p>
1936   * Description: <b>A city specified in an address</b><br>
1937   * Type: <b>string</b><br>
1938   * Path: <b>Practitioner.address.city</b><br>
1939   * </p>
1940   */
1941  @SearchParamDefinition(name="address-city", path="Practitioner.address.city", description="A city specified in an address", type="string" )
1942  public static final String SP_ADDRESS_CITY = "address-city";
1943 /**
1944   * <b>Fluent Client</b> search parameter constant for <b>address-city</b>
1945   * <p>
1946   * Description: <b>A city specified in an address</b><br>
1947   * Type: <b>string</b><br>
1948   * Path: <b>Practitioner.address.city</b><br>
1949   * </p>
1950   */
1951  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_CITY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_CITY);
1952
1953 /**
1954   * Search parameter: <b>address-state</b>
1955   * <p>
1956   * Description: <b>A state specified in an address</b><br>
1957   * Type: <b>string</b><br>
1958   * Path: <b>Practitioner.address.state</b><br>
1959   * </p>
1960   */
1961  @SearchParamDefinition(name="address-state", path="Practitioner.address.state", description="A state specified in an address", type="string" )
1962  public static final String SP_ADDRESS_STATE = "address-state";
1963 /**
1964   * <b>Fluent Client</b> search parameter constant for <b>address-state</b>
1965   * <p>
1966   * Description: <b>A state specified in an address</b><br>
1967   * Type: <b>string</b><br>
1968   * Path: <b>Practitioner.address.state</b><br>
1969   * </p>
1970   */
1971  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_STATE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_STATE);
1972
1973 /**
1974   * Search parameter: <b>given</b>
1975   * <p>
1976   * Description: <b>A portion of the given name</b><br>
1977   * Type: <b>string</b><br>
1978   * Path: <b>Practitioner.name.given</b><br>
1979   * </p>
1980   */
1981  @SearchParamDefinition(name="given", path="Practitioner.name.given", description="A portion of the given name", type="string" )
1982  public static final String SP_GIVEN = "given";
1983 /**
1984   * <b>Fluent Client</b> search parameter constant for <b>given</b>
1985   * <p>
1986   * Description: <b>A portion of the given name</b><br>
1987   * Type: <b>string</b><br>
1988   * Path: <b>Practitioner.name.given</b><br>
1989   * </p>
1990   */
1991  public static final ca.uhn.fhir.rest.gclient.StringClientParam GIVEN = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_GIVEN);
1992
1993 /**
1994   * Search parameter: <b>email</b>
1995   * <p>
1996   * Description: <b>A value in an email contact</b><br>
1997   * Type: <b>token</b><br>
1998   * Path: <b>Practitioner.telecom(system=email), Practitioner.practitionerRole.telecom(system=email)</b><br>
1999   * </p>
2000   */
2001  @SearchParamDefinition(name="email", path="Practitioner.telecom.where(system='email') or Practitioner.practitionerRole.telecom.where(system='email')", description="A value in an email contact", type="token" )
2002  public static final String SP_EMAIL = "email";
2003 /**
2004   * <b>Fluent Client</b> search parameter constant for <b>email</b>
2005   * <p>
2006   * Description: <b>A value in an email contact</b><br>
2007   * Type: <b>token</b><br>
2008   * Path: <b>Practitioner.telecom(system=email), Practitioner.practitionerRole.telecom(system=email)</b><br>
2009   * </p>
2010   */
2011  public static final ca.uhn.fhir.rest.gclient.TokenClientParam EMAIL = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_EMAIL);
2012
2013 /**
2014   * Search parameter: <b>address</b>
2015   * <p>
2016   * Description: <b>An address in any kind of address/part</b><br>
2017   * Type: <b>string</b><br>
2018   * Path: <b>Practitioner.address</b><br>
2019   * </p>
2020   */
2021  @SearchParamDefinition(name="address", path="Practitioner.address", description="An address in any kind of address/part", type="string" )
2022  public static final String SP_ADDRESS = "address";
2023 /**
2024   * <b>Fluent Client</b> search parameter constant for <b>address</b>
2025   * <p>
2026   * Description: <b>An address in any kind of address/part</b><br>
2027   * Type: <b>string</b><br>
2028   * Path: <b>Practitioner.address</b><br>
2029   * </p>
2030   */
2031  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS);
2032
2033 /**
2034   * Search parameter: <b>address-use</b>
2035   * <p>
2036   * Description: <b>A use code specified in an address</b><br>
2037   * Type: <b>token</b><br>
2038   * Path: <b>Practitioner.address.use</b><br>
2039   * </p>
2040   */
2041  @SearchParamDefinition(name="address-use", path="Practitioner.address.use", description="A use code specified in an address", type="token" )
2042  public static final String SP_ADDRESS_USE = "address-use";
2043 /**
2044   * <b>Fluent Client</b> search parameter constant for <b>address-use</b>
2045   * <p>
2046   * Description: <b>A use code specified in an address</b><br>
2047   * Type: <b>token</b><br>
2048   * Path: <b>Practitioner.address.use</b><br>
2049   * </p>
2050   */
2051  public static final ca.uhn.fhir.rest.gclient.TokenClientParam ADDRESS_USE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ADDRESS_USE);
2052
2053 /**
2054   * Search parameter: <b>family</b>
2055   * <p>
2056   * Description: <b>A portion of the family name</b><br>
2057   * Type: <b>string</b><br>
2058   * Path: <b>Practitioner.name.family</b><br>
2059   * </p>
2060   */
2061  @SearchParamDefinition(name="family", path="Practitioner.name.family", description="A portion of the family name", type="string" )
2062  public static final String SP_FAMILY = "family";
2063 /**
2064   * <b>Fluent Client</b> search parameter constant for <b>family</b>
2065   * <p>
2066   * Description: <b>A portion of the family name</b><br>
2067   * Type: <b>string</b><br>
2068   * Path: <b>Practitioner.name.family</b><br>
2069   * </p>
2070   */
2071  public static final ca.uhn.fhir.rest.gclient.StringClientParam FAMILY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_FAMILY);
2072
2073 /**
2074   * Search parameter: <b>name</b>
2075   * <p>
2076   * Description: <b>A portion of either family or given name</b><br>
2077   * Type: <b>string</b><br>
2078   * Path: <b>Practitioner.name</b><br>
2079   * </p>
2080   */
2081  @SearchParamDefinition(name="name", path="Practitioner.name", description="A portion of either family or given name", type="string" )
2082  public static final String SP_NAME = "name";
2083 /**
2084   * <b>Fluent Client</b> search parameter constant for <b>name</b>
2085   * <p>
2086   * Description: <b>A portion of either family or given name</b><br>
2087   * Type: <b>string</b><br>
2088   * Path: <b>Practitioner.name</b><br>
2089   * </p>
2090   */
2091  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
2092
2093 /**
2094   * Search parameter: <b>telecom</b>
2095   * <p>
2096   * Description: <b>The value in any kind of contact</b><br>
2097   * Type: <b>token</b><br>
2098   * Path: <b>Practitioner.telecom, Practitioner.practitionerRole.telecom</b><br>
2099   * </p>
2100   */
2101  @SearchParamDefinition(name="telecom", path="Practitioner.telecom | Practitioner.practitionerRole.telecom", description="The value in any kind of contact", type="token" )
2102  public static final String SP_TELECOM = "telecom";
2103 /**
2104   * <b>Fluent Client</b> search parameter constant for <b>telecom</b>
2105   * <p>
2106   * Description: <b>The value in any kind of contact</b><br>
2107   * Type: <b>token</b><br>
2108   * Path: <b>Practitioner.telecom, Practitioner.practitionerRole.telecom</b><br>
2109   * </p>
2110   */
2111  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TELECOM = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TELECOM);
2112
2113 /**
2114   * Search parameter: <b>role</b>
2115   * <p>
2116   * Description: <b>The practitioner can perform this role at for the organization</b><br>
2117   * Type: <b>token</b><br>
2118   * Path: <b>Practitioner.practitionerRole.role</b><br>
2119   * </p>
2120   */
2121  @SearchParamDefinition(name="role", path="Practitioner.practitionerRole.role", description="The practitioner can perform this role at for the organization", type="token" )
2122  public static final String SP_ROLE = "role";
2123 /**
2124   * <b>Fluent Client</b> search parameter constant for <b>role</b>
2125   * <p>
2126   * Description: <b>The practitioner can perform this role at for the organization</b><br>
2127   * Type: <b>token</b><br>
2128   * Path: <b>Practitioner.practitionerRole.role</b><br>
2129   * </p>
2130   */
2131  public static final ca.uhn.fhir.rest.gclient.TokenClientParam ROLE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ROLE);
2132
2133 /**
2134   * Search parameter: <b>gender</b>
2135   * <p>
2136   * Description: <b>Gender of the practitioner</b><br>
2137   * Type: <b>token</b><br>
2138   * Path: <b>Practitioner.gender</b><br>
2139   * </p>
2140   */
2141  @SearchParamDefinition(name="gender", path="Practitioner.gender", description="Gender of the practitioner", type="token" )
2142  public static final String SP_GENDER = "gender";
2143 /**
2144   * <b>Fluent Client</b> search parameter constant for <b>gender</b>
2145   * <p>
2146   * Description: <b>Gender of the practitioner</b><br>
2147   * Type: <b>token</b><br>
2148   * Path: <b>Practitioner.gender</b><br>
2149   * </p>
2150   */
2151  public static final ca.uhn.fhir.rest.gclient.TokenClientParam GENDER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_GENDER);
2152
2153 /**
2154   * Search parameter: <b>specialty</b>
2155   * <p>
2156   * Description: <b>The practitioner has this specialty at an organization</b><br>
2157   * Type: <b>token</b><br>
2158   * Path: <b>Practitioner.practitionerRole.specialty</b><br>
2159   * </p>
2160   */
2161  @SearchParamDefinition(name="specialty", path="Practitioner.practitionerRole.specialty", description="The practitioner has this specialty at an organization", type="token" )
2162  public static final String SP_SPECIALTY = "specialty";
2163 /**
2164   * <b>Fluent Client</b> search parameter constant for <b>specialty</b>
2165   * <p>
2166   * Description: <b>The practitioner has this specialty at an organization</b><br>
2167   * Type: <b>token</b><br>
2168   * Path: <b>Practitioner.practitionerRole.specialty</b><br>
2169   * </p>
2170   */
2171  public static final ca.uhn.fhir.rest.gclient.TokenClientParam SPECIALTY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SPECIALTY);
2172
2173 /**
2174   * Search parameter: <b>identifier</b>
2175   * <p>
2176   * Description: <b>A practitioner's Identifier</b><br>
2177   * Type: <b>token</b><br>
2178   * Path: <b>Practitioner.identifier, Practitioner.practitionerRole.identifier</b><br>
2179   * </p>
2180   */
2181  @SearchParamDefinition(name="identifier", path="Practitioner.identifier | Practitioner.practitionerRole.identifier", description="A practitioner's Identifier", type="token" )
2182  public static final String SP_IDENTIFIER = "identifier";
2183 /**
2184   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2185   * <p>
2186   * Description: <b>A practitioner's Identifier</b><br>
2187   * Type: <b>token</b><br>
2188   * Path: <b>Practitioner.identifier, Practitioner.practitionerRole.identifier</b><br>
2189   * </p>
2190   */
2191  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2192
2193 /**
2194   * Search parameter: <b>address-postalcode</b>
2195   * <p>
2196   * Description: <b>A postalCode specified in an address</b><br>
2197   * Type: <b>string</b><br>
2198   * Path: <b>Practitioner.address.postalCode</b><br>
2199   * </p>
2200   */
2201  @SearchParamDefinition(name="address-postalcode", path="Practitioner.address.postalCode", description="A postalCode specified in an address", type="string" )
2202  public static final String SP_ADDRESS_POSTALCODE = "address-postalcode";
2203 /**
2204   * <b>Fluent Client</b> search parameter constant for <b>address-postalcode</b>
2205   * <p>
2206   * Description: <b>A postalCode specified in an address</b><br>
2207   * Type: <b>string</b><br>
2208   * Path: <b>Practitioner.address.postalCode</b><br>
2209   * </p>
2210   */
2211  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_POSTALCODE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_POSTALCODE);
2212
2213
2214}