001package org.hl7.fhir.r5.model;
002
003/*-
004 * #%L
005 * org.hl7.fhir.r5
006 * %%
007 * Copyright (C) 2014 - 2019 Health Level 7
008 * %%
009 * Licensed under the Apache License, Version 2.0 (the "License");
010 * you may not use this file except in compliance with the License.
011 * You may obtain a copy of the License at
012 * 
013 *      http://www.apache.org/licenses/LICENSE-2.0
014 * 
015 * Unless required by applicable law or agreed to in writing, software
016 * distributed under the License is distributed on an "AS IS" BASIS,
017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
018 * See the License for the specific language governing permissions and
019 * limitations under the License.
020 * #L%
021 */
022
023/*
024  Copyright (c) 2011+, HL7, Inc.
025  All rights reserved.
026  
027  Redistribution and use in source and binary forms, with or without modification, 
028  are permitted provided that the following conditions are met:
029  
030   * Redistributions of source code must retain the above copyright notice, this 
031     list of conditions and the following disclaimer.
032   * Redistributions in binary form must reproduce the above copyright notice, 
033     this list of conditions and the following disclaimer in the documentation 
034     and/or other materials provided with the distribution.
035   * Neither the name of HL7 nor the names of its contributors may be used to 
036     endorse or promote products derived from this software without specific 
037     prior written permission.
038  
039  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
040  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
041  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
042  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
043  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
044  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
045  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
046  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
047  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
048  POSSIBILITY OF SUCH DAMAGE.
049  
050*/
051
052// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0
053import java.util.ArrayList;
054import java.util.Date;
055import java.util.List;
056import org.hl7.fhir.exceptions.FHIRException;
057import org.hl7.fhir.instance.model.api.ICompositeType;
058
059import org.hl7.fhir.instance.model.api.IBaseDatatypeElement;
060import org.hl7.fhir.utilities.Utilities;
061import org.hl7.fhir.r5.model.Enumerations.*;
062import ca.uhn.fhir.model.api.annotation.ResourceDef;
063import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
064import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
065import ca.uhn.fhir.model.api.annotation.Child;
066import ca.uhn.fhir.model.api.annotation.ChildOrder;
067import ca.uhn.fhir.model.api.annotation.Description;
068import ca.uhn.fhir.model.api.annotation.Block;
069/**
070 * A person who is directly or indirectly involved in the provisioning of healthcare.
071 */
072@ResourceDef(name="Practitioner", profile="http://hl7.org/fhir/StructureDefinition/Practitioner")
073public class Practitioner extends DomainResource {
074
075    @Block()
076    public static class PractitionerQualificationComponent extends BackboneElement implements IBaseBackboneElement {
077        /**
078         * An identifier that applies to this person's qualification in this role.
079         */
080        @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
081        @Description(shortDefinition="An identifier for this qualification for the practitioner", formalDefinition="An identifier that applies to this person's qualification in this role." )
082        protected List<Identifier> identifier;
083
084        /**
085         * Coded representation of the qualification.
086         */
087        @Child(name = "code", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=false)
088        @Description(shortDefinition="Coded representation of the qualification", formalDefinition="Coded representation of the qualification." )
089        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v2-2.7-0360")
090        protected CodeableConcept code;
091
092        /**
093         * Period during which the qualification is valid.
094         */
095        @Child(name = "period", type = {Period.class}, order=3, min=0, max=1, modifier=false, summary=false)
096        @Description(shortDefinition="Period during which the qualification is valid", formalDefinition="Period during which the qualification is valid." )
097        protected Period period;
098
099        /**
100         * Organization that regulates and issues the qualification.
101         */
102        @Child(name = "issuer", type = {Organization.class}, order=4, min=0, max=1, modifier=false, summary=false)
103        @Description(shortDefinition="Organization that regulates and issues the qualification", formalDefinition="Organization that regulates and issues the qualification." )
104        protected Reference issuer;
105
106        private static final long serialVersionUID = 1561812204L;
107
108    /**
109     * Constructor
110     */
111      public PractitionerQualificationComponent() {
112        super();
113      }
114
115    /**
116     * Constructor
117     */
118      public PractitionerQualificationComponent(CodeableConcept code) {
119        super();
120        this.code = code;
121      }
122
123        /**
124         * @return {@link #identifier} (An identifier that applies to this person's qualification in this role.)
125         */
126        public List<Identifier> getIdentifier() { 
127          if (this.identifier == null)
128            this.identifier = new ArrayList<Identifier>();
129          return this.identifier;
130        }
131
132        /**
133         * @return Returns a reference to <code>this</code> for easy method chaining
134         */
135        public PractitionerQualificationComponent setIdentifier(List<Identifier> theIdentifier) { 
136          this.identifier = theIdentifier;
137          return this;
138        }
139
140        public boolean hasIdentifier() { 
141          if (this.identifier == null)
142            return false;
143          for (Identifier item : this.identifier)
144            if (!item.isEmpty())
145              return true;
146          return false;
147        }
148
149        public Identifier addIdentifier() { //3
150          Identifier t = new Identifier();
151          if (this.identifier == null)
152            this.identifier = new ArrayList<Identifier>();
153          this.identifier.add(t);
154          return t;
155        }
156
157        public PractitionerQualificationComponent addIdentifier(Identifier t) { //3
158          if (t == null)
159            return this;
160          if (this.identifier == null)
161            this.identifier = new ArrayList<Identifier>();
162          this.identifier.add(t);
163          return this;
164        }
165
166        /**
167         * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
168         */
169        public Identifier getIdentifierFirstRep() { 
170          if (getIdentifier().isEmpty()) {
171            addIdentifier();
172          }
173          return getIdentifier().get(0);
174        }
175
176        /**
177         * @return {@link #code} (Coded representation of the qualification.)
178         */
179        public CodeableConcept getCode() { 
180          if (this.code == null)
181            if (Configuration.errorOnAutoCreate())
182              throw new Error("Attempt to auto-create PractitionerQualificationComponent.code");
183            else if (Configuration.doAutoCreate())
184              this.code = new CodeableConcept(); // cc
185          return this.code;
186        }
187
188        public boolean hasCode() { 
189          return this.code != null && !this.code.isEmpty();
190        }
191
192        /**
193         * @param value {@link #code} (Coded representation of the qualification.)
194         */
195        public PractitionerQualificationComponent setCode(CodeableConcept value) { 
196          this.code = value;
197          return this;
198        }
199
200        /**
201         * @return {@link #period} (Period during which the qualification is valid.)
202         */
203        public Period getPeriod() { 
204          if (this.period == null)
205            if (Configuration.errorOnAutoCreate())
206              throw new Error("Attempt to auto-create PractitionerQualificationComponent.period");
207            else if (Configuration.doAutoCreate())
208              this.period = new Period(); // cc
209          return this.period;
210        }
211
212        public boolean hasPeriod() { 
213          return this.period != null && !this.period.isEmpty();
214        }
215
216        /**
217         * @param value {@link #period} (Period during which the qualification is valid.)
218         */
219        public PractitionerQualificationComponent setPeriod(Period value) { 
220          this.period = value;
221          return this;
222        }
223
224        /**
225         * @return {@link #issuer} (Organization that regulates and issues the qualification.)
226         */
227        public Reference getIssuer() { 
228          if (this.issuer == null)
229            if (Configuration.errorOnAutoCreate())
230              throw new Error("Attempt to auto-create PractitionerQualificationComponent.issuer");
231            else if (Configuration.doAutoCreate())
232              this.issuer = new Reference(); // cc
233          return this.issuer;
234        }
235
236        public boolean hasIssuer() { 
237          return this.issuer != null && !this.issuer.isEmpty();
238        }
239
240        /**
241         * @param value {@link #issuer} (Organization that regulates and issues the qualification.)
242         */
243        public PractitionerQualificationComponent setIssuer(Reference value) { 
244          this.issuer = value;
245          return this;
246        }
247
248        protected void listChildren(List<Property> children) {
249          super.listChildren(children);
250          children.add(new Property("identifier", "Identifier", "An identifier that applies to this person's qualification in this role.", 0, java.lang.Integer.MAX_VALUE, identifier));
251          children.add(new Property("code", "CodeableConcept", "Coded representation of the qualification.", 0, 1, code));
252          children.add(new Property("period", "Period", "Period during which the qualification is valid.", 0, 1, period));
253          children.add(new Property("issuer", "Reference(Organization)", "Organization that regulates and issues the qualification.", 0, 1, issuer));
254        }
255
256        @Override
257        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
258          switch (_hash) {
259          case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "An identifier that applies to this person's qualification in this role.", 0, java.lang.Integer.MAX_VALUE, identifier);
260          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "Coded representation of the qualification.", 0, 1, code);
261          case -991726143: /*period*/  return new Property("period", "Period", "Period during which the qualification is valid.", 0, 1, period);
262          case -1179159879: /*issuer*/  return new Property("issuer", "Reference(Organization)", "Organization that regulates and issues the qualification.", 0, 1, issuer);
263          default: return super.getNamedProperty(_hash, _name, _checkValid);
264          }
265
266        }
267
268      @Override
269      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
270        switch (hash) {
271        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
272        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
273        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
274        case -1179159879: /*issuer*/ return this.issuer == null ? new Base[0] : new Base[] {this.issuer}; // Reference
275        default: return super.getProperty(hash, name, checkValid);
276        }
277
278      }
279
280      @Override
281      public Base setProperty(int hash, String name, Base value) throws FHIRException {
282        switch (hash) {
283        case -1618432855: // identifier
284          this.getIdentifier().add(castToIdentifier(value)); // Identifier
285          return value;
286        case 3059181: // code
287          this.code = castToCodeableConcept(value); // CodeableConcept
288          return value;
289        case -991726143: // period
290          this.period = castToPeriod(value); // Period
291          return value;
292        case -1179159879: // issuer
293          this.issuer = castToReference(value); // Reference
294          return value;
295        default: return super.setProperty(hash, name, value);
296        }
297
298      }
299
300      @Override
301      public Base setProperty(String name, Base value) throws FHIRException {
302        if (name.equals("identifier")) {
303          this.getIdentifier().add(castToIdentifier(value));
304        } else if (name.equals("code")) {
305          this.code = castToCodeableConcept(value); // CodeableConcept
306        } else if (name.equals("period")) {
307          this.period = castToPeriod(value); // Period
308        } else if (name.equals("issuer")) {
309          this.issuer = castToReference(value); // Reference
310        } else
311          return super.setProperty(name, value);
312        return value;
313      }
314
315      @Override
316      public Base makeProperty(int hash, String name) throws FHIRException {
317        switch (hash) {
318        case -1618432855:  return addIdentifier(); 
319        case 3059181:  return getCode();
320        case -991726143:  return getPeriod();
321        case -1179159879:  return getIssuer();
322        default: return super.makeProperty(hash, name);
323        }
324
325      }
326
327      @Override
328      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
329        switch (hash) {
330        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
331        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
332        case -991726143: /*period*/ return new String[] {"Period"};
333        case -1179159879: /*issuer*/ return new String[] {"Reference"};
334        default: return super.getTypesForProperty(hash, name);
335        }
336
337      }
338
339      @Override
340      public Base addChild(String name) throws FHIRException {
341        if (name.equals("identifier")) {
342          return addIdentifier();
343        }
344        else if (name.equals("code")) {
345          this.code = new CodeableConcept();
346          return this.code;
347        }
348        else if (name.equals("period")) {
349          this.period = new Period();
350          return this.period;
351        }
352        else if (name.equals("issuer")) {
353          this.issuer = new Reference();
354          return this.issuer;
355        }
356        else
357          return super.addChild(name);
358      }
359
360      public PractitionerQualificationComponent copy() {
361        PractitionerQualificationComponent dst = new PractitionerQualificationComponent();
362        copyValues(dst);
363        return dst;
364      }
365
366      public void copyValues(PractitionerQualificationComponent dst) {
367        super.copyValues(dst);
368        if (identifier != null) {
369          dst.identifier = new ArrayList<Identifier>();
370          for (Identifier i : identifier)
371            dst.identifier.add(i.copy());
372        };
373        dst.code = code == null ? null : code.copy();
374        dst.period = period == null ? null : period.copy();
375        dst.issuer = issuer == null ? null : issuer.copy();
376      }
377
378      @Override
379      public boolean equalsDeep(Base other_) {
380        if (!super.equalsDeep(other_))
381          return false;
382        if (!(other_ instanceof PractitionerQualificationComponent))
383          return false;
384        PractitionerQualificationComponent o = (PractitionerQualificationComponent) other_;
385        return compareDeep(identifier, o.identifier, true) && compareDeep(code, o.code, true) && compareDeep(period, o.period, true)
386           && compareDeep(issuer, o.issuer, true);
387      }
388
389      @Override
390      public boolean equalsShallow(Base other_) {
391        if (!super.equalsShallow(other_))
392          return false;
393        if (!(other_ instanceof PractitionerQualificationComponent))
394          return false;
395        PractitionerQualificationComponent o = (PractitionerQualificationComponent) other_;
396        return true;
397      }
398
399      public boolean isEmpty() {
400        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, code, period
401          , issuer);
402      }
403
404  public String fhirType() {
405    return "Practitioner.qualification";
406
407  }
408
409  }
410
411    /**
412     * An identifier that applies to this person in this role.
413     */
414    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
415    @Description(shortDefinition="An identifier for the person as this agent", formalDefinition="An identifier that applies to this person in this role." )
416    protected List<Identifier> identifier;
417
418    /**
419     * Whether this practitioner's record is in active use.
420     */
421    @Child(name = "active", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=true)
422    @Description(shortDefinition="Whether this practitioner's record is in active use", formalDefinition="Whether this practitioner's record is in active use." )
423    protected BooleanType active;
424
425    /**
426     * The name(s) associated with the practitioner.
427     */
428    @Child(name = "name", type = {HumanName.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
429    @Description(shortDefinition="The name(s) associated with the practitioner", formalDefinition="The name(s) associated with the practitioner." )
430    protected List<HumanName> name;
431
432    /**
433     * A contact detail for the practitioner, e.g. a telephone number or an email address.
434     */
435    @Child(name = "telecom", type = {ContactPoint.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
436    @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." )
437    protected List<ContactPoint> telecom;
438
439    /**
440     * Address(es) of the practitioner that are not role specific (typically home address). 
441Work addresses are not typically entered in this property as they are usually role dependent.
442     */
443    @Child(name = "address", type = {Address.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
444    @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). \rWork addresses are not typically entered in this property as they are usually role dependent." )
445    protected List<Address> address;
446
447    /**
448     * Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
449     */
450    @Child(name = "gender", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=true)
451    @Description(shortDefinition="male | female | other | unknown", formalDefinition="Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes." )
452    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/administrative-gender")
453    protected Enumeration<AdministrativeGender> gender;
454
455    /**
456     * The date of birth for the practitioner.
457     */
458    @Child(name = "birthDate", type = {DateType.class}, order=6, min=0, max=1, modifier=false, summary=true)
459    @Description(shortDefinition="The date  on which the practitioner was born", formalDefinition="The date of birth for the practitioner." )
460    protected DateType birthDate;
461
462    /**
463     * Image of the person.
464     */
465    @Child(name = "photo", type = {Attachment.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
466    @Description(shortDefinition="Image of the person", formalDefinition="Image of the person." )
467    protected List<Attachment> photo;
468
469    /**
470     * The official certifications, training, and licenses that authorize or otherwise pertain to the provision of care by the practitioner.  For example, a medical license issued by a medical board authorizing the practitioner to practice medicine within a certian locality.
471     */
472    @Child(name = "qualification", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
473    @Description(shortDefinition="Certification, licenses, or training pertaining to the provision of care", formalDefinition="The official certifications, training, and licenses that authorize or otherwise pertain to the provision of care by the practitioner.  For example, a medical license issued by a medical board authorizing the practitioner to practice medicine within a certian locality." )
474    protected List<PractitionerQualificationComponent> qualification;
475
476    /**
477     * A language the practitioner can use in patient communication.
478     */
479    @Child(name = "communication", type = {CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
480    @Description(shortDefinition="A language the practitioner can use in patient communication", formalDefinition="A language the practitioner can use in patient communication." )
481    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/languages")
482    protected List<CodeableConcept> communication;
483
484    private static final long serialVersionUID = 2128349259L;
485
486  /**
487   * Constructor
488   */
489    public Practitioner() {
490      super();
491    }
492
493    /**
494     * @return {@link #identifier} (An identifier that applies to this person in this role.)
495     */
496    public List<Identifier> getIdentifier() { 
497      if (this.identifier == null)
498        this.identifier = new ArrayList<Identifier>();
499      return this.identifier;
500    }
501
502    /**
503     * @return Returns a reference to <code>this</code> for easy method chaining
504     */
505    public Practitioner setIdentifier(List<Identifier> theIdentifier) { 
506      this.identifier = theIdentifier;
507      return this;
508    }
509
510    public boolean hasIdentifier() { 
511      if (this.identifier == null)
512        return false;
513      for (Identifier item : this.identifier)
514        if (!item.isEmpty())
515          return true;
516      return false;
517    }
518
519    public Identifier addIdentifier() { //3
520      Identifier t = new Identifier();
521      if (this.identifier == null)
522        this.identifier = new ArrayList<Identifier>();
523      this.identifier.add(t);
524      return t;
525    }
526
527    public Practitioner addIdentifier(Identifier t) { //3
528      if (t == null)
529        return this;
530      if (this.identifier == null)
531        this.identifier = new ArrayList<Identifier>();
532      this.identifier.add(t);
533      return this;
534    }
535
536    /**
537     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
538     */
539    public Identifier getIdentifierFirstRep() { 
540      if (getIdentifier().isEmpty()) {
541        addIdentifier();
542      }
543      return getIdentifier().get(0);
544    }
545
546    /**
547     * @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
548     */
549    public BooleanType getActiveElement() { 
550      if (this.active == null)
551        if (Configuration.errorOnAutoCreate())
552          throw new Error("Attempt to auto-create Practitioner.active");
553        else if (Configuration.doAutoCreate())
554          this.active = new BooleanType(); // bb
555      return this.active;
556    }
557
558    public boolean hasActiveElement() { 
559      return this.active != null && !this.active.isEmpty();
560    }
561
562    public boolean hasActive() { 
563      return this.active != null && !this.active.isEmpty();
564    }
565
566    /**
567     * @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
568     */
569    public Practitioner setActiveElement(BooleanType value) { 
570      this.active = value;
571      return this;
572    }
573
574    /**
575     * @return Whether this practitioner's record is in active use.
576     */
577    public boolean getActive() { 
578      return this.active == null || this.active.isEmpty() ? false : this.active.getValue();
579    }
580
581    /**
582     * @param value Whether this practitioner's record is in active use.
583     */
584    public Practitioner setActive(boolean value) { 
585        if (this.active == null)
586          this.active = new BooleanType();
587        this.active.setValue(value);
588      return this;
589    }
590
591    /**
592     * @return {@link #name} (The name(s) associated with the practitioner.)
593     */
594    public List<HumanName> getName() { 
595      if (this.name == null)
596        this.name = new ArrayList<HumanName>();
597      return this.name;
598    }
599
600    /**
601     * @return Returns a reference to <code>this</code> for easy method chaining
602     */
603    public Practitioner setName(List<HumanName> theName) { 
604      this.name = theName;
605      return this;
606    }
607
608    public boolean hasName() { 
609      if (this.name == null)
610        return false;
611      for (HumanName item : this.name)
612        if (!item.isEmpty())
613          return true;
614      return false;
615    }
616
617    public HumanName addName() { //3
618      HumanName t = new HumanName();
619      if (this.name == null)
620        this.name = new ArrayList<HumanName>();
621      this.name.add(t);
622      return t;
623    }
624
625    public Practitioner addName(HumanName t) { //3
626      if (t == null)
627        return this;
628      if (this.name == null)
629        this.name = new ArrayList<HumanName>();
630      this.name.add(t);
631      return this;
632    }
633
634    /**
635     * @return The first repetition of repeating field {@link #name}, creating it if it does not already exist
636     */
637    public HumanName getNameFirstRep() { 
638      if (getName().isEmpty()) {
639        addName();
640      }
641      return getName().get(0);
642    }
643
644    /**
645     * @return {@link #telecom} (A contact detail for the practitioner, e.g. a telephone number or an email address.)
646     */
647    public List<ContactPoint> getTelecom() { 
648      if (this.telecom == null)
649        this.telecom = new ArrayList<ContactPoint>();
650      return this.telecom;
651    }
652
653    /**
654     * @return Returns a reference to <code>this</code> for easy method chaining
655     */
656    public Practitioner setTelecom(List<ContactPoint> theTelecom) { 
657      this.telecom = theTelecom;
658      return this;
659    }
660
661    public boolean hasTelecom() { 
662      if (this.telecom == null)
663        return false;
664      for (ContactPoint item : this.telecom)
665        if (!item.isEmpty())
666          return true;
667      return false;
668    }
669
670    public ContactPoint addTelecom() { //3
671      ContactPoint t = new ContactPoint();
672      if (this.telecom == null)
673        this.telecom = new ArrayList<ContactPoint>();
674      this.telecom.add(t);
675      return t;
676    }
677
678    public Practitioner addTelecom(ContactPoint t) { //3
679      if (t == null)
680        return this;
681      if (this.telecom == null)
682        this.telecom = new ArrayList<ContactPoint>();
683      this.telecom.add(t);
684      return this;
685    }
686
687    /**
688     * @return The first repetition of repeating field {@link #telecom}, creating it if it does not already exist
689     */
690    public ContactPoint getTelecomFirstRep() { 
691      if (getTelecom().isEmpty()) {
692        addTelecom();
693      }
694      return getTelecom().get(0);
695    }
696
697    /**
698     * @return {@link #address} (Address(es) of the practitioner that are not role specific (typically home address). 
699Work addresses are not typically entered in this property as they are usually role dependent.)
700     */
701    public List<Address> getAddress() { 
702      if (this.address == null)
703        this.address = new ArrayList<Address>();
704      return this.address;
705    }
706
707    /**
708     * @return Returns a reference to <code>this</code> for easy method chaining
709     */
710    public Practitioner setAddress(List<Address> theAddress) { 
711      this.address = theAddress;
712      return this;
713    }
714
715    public boolean hasAddress() { 
716      if (this.address == null)
717        return false;
718      for (Address item : this.address)
719        if (!item.isEmpty())
720          return true;
721      return false;
722    }
723
724    public Address addAddress() { //3
725      Address t = new Address();
726      if (this.address == null)
727        this.address = new ArrayList<Address>();
728      this.address.add(t);
729      return t;
730    }
731
732    public Practitioner addAddress(Address t) { //3
733      if (t == null)
734        return this;
735      if (this.address == null)
736        this.address = new ArrayList<Address>();
737      this.address.add(t);
738      return this;
739    }
740
741    /**
742     * @return The first repetition of repeating field {@link #address}, creating it if it does not already exist
743     */
744    public Address getAddressFirstRep() { 
745      if (getAddress().isEmpty()) {
746        addAddress();
747      }
748      return getAddress().get(0);
749    }
750
751    /**
752     * @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
753     */
754    public Enumeration<AdministrativeGender> getGenderElement() { 
755      if (this.gender == null)
756        if (Configuration.errorOnAutoCreate())
757          throw new Error("Attempt to auto-create Practitioner.gender");
758        else if (Configuration.doAutoCreate())
759          this.gender = new Enumeration<AdministrativeGender>(new AdministrativeGenderEnumFactory()); // bb
760      return this.gender;
761    }
762
763    public boolean hasGenderElement() { 
764      return this.gender != null && !this.gender.isEmpty();
765    }
766
767    public boolean hasGender() { 
768      return this.gender != null && !this.gender.isEmpty();
769    }
770
771    /**
772     * @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
773     */
774    public Practitioner setGenderElement(Enumeration<AdministrativeGender> value) { 
775      this.gender = value;
776      return this;
777    }
778
779    /**
780     * @return Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
781     */
782    public AdministrativeGender getGender() { 
783      return this.gender == null ? null : this.gender.getValue();
784    }
785
786    /**
787     * @param value Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
788     */
789    public Practitioner setGender(AdministrativeGender value) { 
790      if (value == null)
791        this.gender = null;
792      else {
793        if (this.gender == null)
794          this.gender = new Enumeration<AdministrativeGender>(new AdministrativeGenderEnumFactory());
795        this.gender.setValue(value);
796      }
797      return this;
798    }
799
800    /**
801     * @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
802     */
803    public DateType getBirthDateElement() { 
804      if (this.birthDate == null)
805        if (Configuration.errorOnAutoCreate())
806          throw new Error("Attempt to auto-create Practitioner.birthDate");
807        else if (Configuration.doAutoCreate())
808          this.birthDate = new DateType(); // bb
809      return this.birthDate;
810    }
811
812    public boolean hasBirthDateElement() { 
813      return this.birthDate != null && !this.birthDate.isEmpty();
814    }
815
816    public boolean hasBirthDate() { 
817      return this.birthDate != null && !this.birthDate.isEmpty();
818    }
819
820    /**
821     * @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
822     */
823    public Practitioner setBirthDateElement(DateType value) { 
824      this.birthDate = value;
825      return this;
826    }
827
828    /**
829     * @return The date of birth for the practitioner.
830     */
831    public Date getBirthDate() { 
832      return this.birthDate == null ? null : this.birthDate.getValue();
833    }
834
835    /**
836     * @param value The date of birth for the practitioner.
837     */
838    public Practitioner setBirthDate(Date value) { 
839      if (value == null)
840        this.birthDate = null;
841      else {
842        if (this.birthDate == null)
843          this.birthDate = new DateType();
844        this.birthDate.setValue(value);
845      }
846      return this;
847    }
848
849    /**
850     * @return {@link #photo} (Image of the person.)
851     */
852    public List<Attachment> getPhoto() { 
853      if (this.photo == null)
854        this.photo = new ArrayList<Attachment>();
855      return this.photo;
856    }
857
858    /**
859     * @return Returns a reference to <code>this</code> for easy method chaining
860     */
861    public Practitioner setPhoto(List<Attachment> thePhoto) { 
862      this.photo = thePhoto;
863      return this;
864    }
865
866    public boolean hasPhoto() { 
867      if (this.photo == null)
868        return false;
869      for (Attachment item : this.photo)
870        if (!item.isEmpty())
871          return true;
872      return false;
873    }
874
875    public Attachment addPhoto() { //3
876      Attachment t = new Attachment();
877      if (this.photo == null)
878        this.photo = new ArrayList<Attachment>();
879      this.photo.add(t);
880      return t;
881    }
882
883    public Practitioner addPhoto(Attachment t) { //3
884      if (t == null)
885        return this;
886      if (this.photo == null)
887        this.photo = new ArrayList<Attachment>();
888      this.photo.add(t);
889      return this;
890    }
891
892    /**
893     * @return The first repetition of repeating field {@link #photo}, creating it if it does not already exist
894     */
895    public Attachment getPhotoFirstRep() { 
896      if (getPhoto().isEmpty()) {
897        addPhoto();
898      }
899      return getPhoto().get(0);
900    }
901
902    /**
903     * @return {@link #qualification} (The official certifications, training, and licenses that authorize or otherwise pertain to the provision of care by the practitioner.  For example, a medical license issued by a medical board authorizing the practitioner to practice medicine within a certian locality.)
904     */
905    public List<PractitionerQualificationComponent> getQualification() { 
906      if (this.qualification == null)
907        this.qualification = new ArrayList<PractitionerQualificationComponent>();
908      return this.qualification;
909    }
910
911    /**
912     * @return Returns a reference to <code>this</code> for easy method chaining
913     */
914    public Practitioner setQualification(List<PractitionerQualificationComponent> theQualification) { 
915      this.qualification = theQualification;
916      return this;
917    }
918
919    public boolean hasQualification() { 
920      if (this.qualification == null)
921        return false;
922      for (PractitionerQualificationComponent item : this.qualification)
923        if (!item.isEmpty())
924          return true;
925      return false;
926    }
927
928    public PractitionerQualificationComponent addQualification() { //3
929      PractitionerQualificationComponent t = new PractitionerQualificationComponent();
930      if (this.qualification == null)
931        this.qualification = new ArrayList<PractitionerQualificationComponent>();
932      this.qualification.add(t);
933      return t;
934    }
935
936    public Practitioner addQualification(PractitionerQualificationComponent t) { //3
937      if (t == null)
938        return this;
939      if (this.qualification == null)
940        this.qualification = new ArrayList<PractitionerQualificationComponent>();
941      this.qualification.add(t);
942      return this;
943    }
944
945    /**
946     * @return The first repetition of repeating field {@link #qualification}, creating it if it does not already exist
947     */
948    public PractitionerQualificationComponent getQualificationFirstRep() { 
949      if (getQualification().isEmpty()) {
950        addQualification();
951      }
952      return getQualification().get(0);
953    }
954
955    /**
956     * @return {@link #communication} (A language the practitioner can use in patient communication.)
957     */
958    public List<CodeableConcept> getCommunication() { 
959      if (this.communication == null)
960        this.communication = new ArrayList<CodeableConcept>();
961      return this.communication;
962    }
963
964    /**
965     * @return Returns a reference to <code>this</code> for easy method chaining
966     */
967    public Practitioner setCommunication(List<CodeableConcept> theCommunication) { 
968      this.communication = theCommunication;
969      return this;
970    }
971
972    public boolean hasCommunication() { 
973      if (this.communication == null)
974        return false;
975      for (CodeableConcept item : this.communication)
976        if (!item.isEmpty())
977          return true;
978      return false;
979    }
980
981    public CodeableConcept addCommunication() { //3
982      CodeableConcept t = new CodeableConcept();
983      if (this.communication == null)
984        this.communication = new ArrayList<CodeableConcept>();
985      this.communication.add(t);
986      return t;
987    }
988
989    public Practitioner addCommunication(CodeableConcept t) { //3
990      if (t == null)
991        return this;
992      if (this.communication == null)
993        this.communication = new ArrayList<CodeableConcept>();
994      this.communication.add(t);
995      return this;
996    }
997
998    /**
999     * @return The first repetition of repeating field {@link #communication}, creating it if it does not already exist
1000     */
1001    public CodeableConcept getCommunicationFirstRep() { 
1002      if (getCommunication().isEmpty()) {
1003        addCommunication();
1004      }
1005      return getCommunication().get(0);
1006    }
1007
1008      protected void listChildren(List<Property> children) {
1009        super.listChildren(children);
1010        children.add(new Property("identifier", "Identifier", "An identifier that applies to this person in this role.", 0, java.lang.Integer.MAX_VALUE, identifier));
1011        children.add(new Property("active", "boolean", "Whether this practitioner's record is in active use.", 0, 1, active));
1012        children.add(new Property("name", "HumanName", "The name(s) associated with the practitioner.", 0, java.lang.Integer.MAX_VALUE, name));
1013        children.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));
1014        children.add(new Property("address", "Address", "Address(es) of the practitioner that are not role specific (typically home address). \rWork addresses are not typically entered in this property as they are usually role dependent.", 0, java.lang.Integer.MAX_VALUE, address));
1015        children.add(new Property("gender", "code", "Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.", 0, 1, gender));
1016        children.add(new Property("birthDate", "date", "The date of birth for the practitioner.", 0, 1, birthDate));
1017        children.add(new Property("photo", "Attachment", "Image of the person.", 0, java.lang.Integer.MAX_VALUE, photo));
1018        children.add(new Property("qualification", "", "The official certifications, training, and licenses that authorize or otherwise pertain to the provision of care by the practitioner.  For example, a medical license issued by a medical board authorizing the practitioner to practice medicine within a certian locality.", 0, java.lang.Integer.MAX_VALUE, qualification));
1019        children.add(new Property("communication", "CodeableConcept", "A language the practitioner can use in patient communication.", 0, java.lang.Integer.MAX_VALUE, communication));
1020      }
1021
1022      @Override
1023      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1024        switch (_hash) {
1025        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "An identifier that applies to this person in this role.", 0, java.lang.Integer.MAX_VALUE, identifier);
1026        case -1422950650: /*active*/  return new Property("active", "boolean", "Whether this practitioner's record is in active use.", 0, 1, active);
1027        case 3373707: /*name*/  return new Property("name", "HumanName", "The name(s) associated with the practitioner.", 0, java.lang.Integer.MAX_VALUE, name);
1028        case -1429363305: /*telecom*/  return 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);
1029        case -1147692044: /*address*/  return new Property("address", "Address", "Address(es) of the practitioner that are not role specific (typically home address). \rWork addresses are not typically entered in this property as they are usually role dependent.", 0, java.lang.Integer.MAX_VALUE, address);
1030        case -1249512767: /*gender*/  return new Property("gender", "code", "Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.", 0, 1, gender);
1031        case -1210031859: /*birthDate*/  return new Property("birthDate", "date", "The date of birth for the practitioner.", 0, 1, birthDate);
1032        case 106642994: /*photo*/  return new Property("photo", "Attachment", "Image of the person.", 0, java.lang.Integer.MAX_VALUE, photo);
1033        case -631333393: /*qualification*/  return new Property("qualification", "", "The official certifications, training, and licenses that authorize or otherwise pertain to the provision of care by the practitioner.  For example, a medical license issued by a medical board authorizing the practitioner to practice medicine within a certian locality.", 0, java.lang.Integer.MAX_VALUE, qualification);
1034        case -1035284522: /*communication*/  return new Property("communication", "CodeableConcept", "A language the practitioner can use in patient communication.", 0, java.lang.Integer.MAX_VALUE, communication);
1035        default: return super.getNamedProperty(_hash, _name, _checkValid);
1036        }
1037
1038      }
1039
1040      @Override
1041      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1042        switch (hash) {
1043        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1044        case -1422950650: /*active*/ return this.active == null ? new Base[0] : new Base[] {this.active}; // BooleanType
1045        case 3373707: /*name*/ return this.name == null ? new Base[0] : this.name.toArray(new Base[this.name.size()]); // HumanName
1046        case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint
1047        case -1147692044: /*address*/ return this.address == null ? new Base[0] : this.address.toArray(new Base[this.address.size()]); // Address
1048        case -1249512767: /*gender*/ return this.gender == null ? new Base[0] : new Base[] {this.gender}; // Enumeration<AdministrativeGender>
1049        case -1210031859: /*birthDate*/ return this.birthDate == null ? new Base[0] : new Base[] {this.birthDate}; // DateType
1050        case 106642994: /*photo*/ return this.photo == null ? new Base[0] : this.photo.toArray(new Base[this.photo.size()]); // Attachment
1051        case -631333393: /*qualification*/ return this.qualification == null ? new Base[0] : this.qualification.toArray(new Base[this.qualification.size()]); // PractitionerQualificationComponent
1052        case -1035284522: /*communication*/ return this.communication == null ? new Base[0] : this.communication.toArray(new Base[this.communication.size()]); // CodeableConcept
1053        default: return super.getProperty(hash, name, checkValid);
1054        }
1055
1056      }
1057
1058      @Override
1059      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1060        switch (hash) {
1061        case -1618432855: // identifier
1062          this.getIdentifier().add(castToIdentifier(value)); // Identifier
1063          return value;
1064        case -1422950650: // active
1065          this.active = castToBoolean(value); // BooleanType
1066          return value;
1067        case 3373707: // name
1068          this.getName().add(castToHumanName(value)); // HumanName
1069          return value;
1070        case -1429363305: // telecom
1071          this.getTelecom().add(castToContactPoint(value)); // ContactPoint
1072          return value;
1073        case -1147692044: // address
1074          this.getAddress().add(castToAddress(value)); // Address
1075          return value;
1076        case -1249512767: // gender
1077          value = new AdministrativeGenderEnumFactory().fromType(castToCode(value));
1078          this.gender = (Enumeration) value; // Enumeration<AdministrativeGender>
1079          return value;
1080        case -1210031859: // birthDate
1081          this.birthDate = castToDate(value); // DateType
1082          return value;
1083        case 106642994: // photo
1084          this.getPhoto().add(castToAttachment(value)); // Attachment
1085          return value;
1086        case -631333393: // qualification
1087          this.getQualification().add((PractitionerQualificationComponent) value); // PractitionerQualificationComponent
1088          return value;
1089        case -1035284522: // communication
1090          this.getCommunication().add(castToCodeableConcept(value)); // CodeableConcept
1091          return value;
1092        default: return super.setProperty(hash, name, value);
1093        }
1094
1095      }
1096
1097      @Override
1098      public Base setProperty(String name, Base value) throws FHIRException {
1099        if (name.equals("identifier")) {
1100          this.getIdentifier().add(castToIdentifier(value));
1101        } else if (name.equals("active")) {
1102          this.active = castToBoolean(value); // BooleanType
1103        } else if (name.equals("name")) {
1104          this.getName().add(castToHumanName(value));
1105        } else if (name.equals("telecom")) {
1106          this.getTelecom().add(castToContactPoint(value));
1107        } else if (name.equals("address")) {
1108          this.getAddress().add(castToAddress(value));
1109        } else if (name.equals("gender")) {
1110          value = new AdministrativeGenderEnumFactory().fromType(castToCode(value));
1111          this.gender = (Enumeration) value; // Enumeration<AdministrativeGender>
1112        } else if (name.equals("birthDate")) {
1113          this.birthDate = castToDate(value); // DateType
1114        } else if (name.equals("photo")) {
1115          this.getPhoto().add(castToAttachment(value));
1116        } else if (name.equals("qualification")) {
1117          this.getQualification().add((PractitionerQualificationComponent) value);
1118        } else if (name.equals("communication")) {
1119          this.getCommunication().add(castToCodeableConcept(value));
1120        } else
1121          return super.setProperty(name, value);
1122        return value;
1123      }
1124
1125      @Override
1126      public Base makeProperty(int hash, String name) throws FHIRException {
1127        switch (hash) {
1128        case -1618432855:  return addIdentifier(); 
1129        case -1422950650:  return getActiveElement();
1130        case 3373707:  return addName(); 
1131        case -1429363305:  return addTelecom(); 
1132        case -1147692044:  return addAddress(); 
1133        case -1249512767:  return getGenderElement();
1134        case -1210031859:  return getBirthDateElement();
1135        case 106642994:  return addPhoto(); 
1136        case -631333393:  return addQualification(); 
1137        case -1035284522:  return addCommunication(); 
1138        default: return super.makeProperty(hash, name);
1139        }
1140
1141      }
1142
1143      @Override
1144      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1145        switch (hash) {
1146        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1147        case -1422950650: /*active*/ return new String[] {"boolean"};
1148        case 3373707: /*name*/ return new String[] {"HumanName"};
1149        case -1429363305: /*telecom*/ return new String[] {"ContactPoint"};
1150        case -1147692044: /*address*/ return new String[] {"Address"};
1151        case -1249512767: /*gender*/ return new String[] {"code"};
1152        case -1210031859: /*birthDate*/ return new String[] {"date"};
1153        case 106642994: /*photo*/ return new String[] {"Attachment"};
1154        case -631333393: /*qualification*/ return new String[] {};
1155        case -1035284522: /*communication*/ return new String[] {"CodeableConcept"};
1156        default: return super.getTypesForProperty(hash, name);
1157        }
1158
1159      }
1160
1161      @Override
1162      public Base addChild(String name) throws FHIRException {
1163        if (name.equals("identifier")) {
1164          return addIdentifier();
1165        }
1166        else if (name.equals("active")) {
1167          throw new FHIRException("Cannot call addChild on a primitive type Practitioner.active");
1168        }
1169        else if (name.equals("name")) {
1170          return addName();
1171        }
1172        else if (name.equals("telecom")) {
1173          return addTelecom();
1174        }
1175        else if (name.equals("address")) {
1176          return addAddress();
1177        }
1178        else if (name.equals("gender")) {
1179          throw new FHIRException("Cannot call addChild on a primitive type Practitioner.gender");
1180        }
1181        else if (name.equals("birthDate")) {
1182          throw new FHIRException("Cannot call addChild on a primitive type Practitioner.birthDate");
1183        }
1184        else if (name.equals("photo")) {
1185          return addPhoto();
1186        }
1187        else if (name.equals("qualification")) {
1188          return addQualification();
1189        }
1190        else if (name.equals("communication")) {
1191          return addCommunication();
1192        }
1193        else
1194          return super.addChild(name);
1195      }
1196
1197  public String fhirType() {
1198    return "Practitioner";
1199
1200  }
1201
1202      public Practitioner copy() {
1203        Practitioner dst = new Practitioner();
1204        copyValues(dst);
1205        return dst;
1206      }
1207
1208      public void copyValues(Practitioner dst) {
1209        super.copyValues(dst);
1210        if (identifier != null) {
1211          dst.identifier = new ArrayList<Identifier>();
1212          for (Identifier i : identifier)
1213            dst.identifier.add(i.copy());
1214        };
1215        dst.active = active == null ? null : active.copy();
1216        if (name != null) {
1217          dst.name = new ArrayList<HumanName>();
1218          for (HumanName i : name)
1219            dst.name.add(i.copy());
1220        };
1221        if (telecom != null) {
1222          dst.telecom = new ArrayList<ContactPoint>();
1223          for (ContactPoint i : telecom)
1224            dst.telecom.add(i.copy());
1225        };
1226        if (address != null) {
1227          dst.address = new ArrayList<Address>();
1228          for (Address i : address)
1229            dst.address.add(i.copy());
1230        };
1231        dst.gender = gender == null ? null : gender.copy();
1232        dst.birthDate = birthDate == null ? null : birthDate.copy();
1233        if (photo != null) {
1234          dst.photo = new ArrayList<Attachment>();
1235          for (Attachment i : photo)
1236            dst.photo.add(i.copy());
1237        };
1238        if (qualification != null) {
1239          dst.qualification = new ArrayList<PractitionerQualificationComponent>();
1240          for (PractitionerQualificationComponent i : qualification)
1241            dst.qualification.add(i.copy());
1242        };
1243        if (communication != null) {
1244          dst.communication = new ArrayList<CodeableConcept>();
1245          for (CodeableConcept i : communication)
1246            dst.communication.add(i.copy());
1247        };
1248      }
1249
1250      protected Practitioner typedCopy() {
1251        return copy();
1252      }
1253
1254      @Override
1255      public boolean equalsDeep(Base other_) {
1256        if (!super.equalsDeep(other_))
1257          return false;
1258        if (!(other_ instanceof Practitioner))
1259          return false;
1260        Practitioner o = (Practitioner) other_;
1261        return compareDeep(identifier, o.identifier, true) && compareDeep(active, o.active, true) && compareDeep(name, o.name, true)
1262           && compareDeep(telecom, o.telecom, true) && compareDeep(address, o.address, true) && compareDeep(gender, o.gender, true)
1263           && compareDeep(birthDate, o.birthDate, true) && compareDeep(photo, o.photo, true) && compareDeep(qualification, o.qualification, true)
1264           && compareDeep(communication, o.communication, true);
1265      }
1266
1267      @Override
1268      public boolean equalsShallow(Base other_) {
1269        if (!super.equalsShallow(other_))
1270          return false;
1271        if (!(other_ instanceof Practitioner))
1272          return false;
1273        Practitioner o = (Practitioner) other_;
1274        return compareValues(active, o.active, true) && compareValues(gender, o.gender, true) && compareValues(birthDate, o.birthDate, true)
1275          ;
1276      }
1277
1278      public boolean isEmpty() {
1279        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, active, name
1280          , telecom, address, gender, birthDate, photo, qualification, communication);
1281      }
1282
1283  @Override
1284  public ResourceType getResourceType() {
1285    return ResourceType.Practitioner;
1286   }
1287
1288 /**
1289   * Search parameter: <b>identifier</b>
1290   * <p>
1291   * Description: <b>A practitioner's Identifier</b><br>
1292   * Type: <b>token</b><br>
1293   * Path: <b>Practitioner.identifier</b><br>
1294   * </p>
1295   */
1296  @SearchParamDefinition(name="identifier", path="Practitioner.identifier", description="A practitioner's Identifier", type="token" )
1297  public static final String SP_IDENTIFIER = "identifier";
1298 /**
1299   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
1300   * <p>
1301   * Description: <b>A practitioner's Identifier</b><br>
1302   * Type: <b>token</b><br>
1303   * Path: <b>Practitioner.identifier</b><br>
1304   * </p>
1305   */
1306  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
1307
1308 /**
1309   * Search parameter: <b>given</b>
1310   * <p>
1311   * Description: <b>A portion of the given name</b><br>
1312   * Type: <b>string</b><br>
1313   * Path: <b>Practitioner.name.given</b><br>
1314   * </p>
1315   */
1316  @SearchParamDefinition(name="given", path="Practitioner.name.given", description="A portion of the given name", type="string" )
1317  public static final String SP_GIVEN = "given";
1318 /**
1319   * <b>Fluent Client</b> search parameter constant for <b>given</b>
1320   * <p>
1321   * Description: <b>A portion of the given name</b><br>
1322   * Type: <b>string</b><br>
1323   * Path: <b>Practitioner.name.given</b><br>
1324   * </p>
1325   */
1326  public static final ca.uhn.fhir.rest.gclient.StringClientParam GIVEN = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_GIVEN);
1327
1328 /**
1329   * Search parameter: <b>address</b>
1330   * <p>
1331   * Description: <b>A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text</b><br>
1332   * Type: <b>string</b><br>
1333   * Path: <b>Practitioner.address</b><br>
1334   * </p>
1335   */
1336  @SearchParamDefinition(name="address", path="Practitioner.address", description="A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text", type="string" )
1337  public static final String SP_ADDRESS = "address";
1338 /**
1339   * <b>Fluent Client</b> search parameter constant for <b>address</b>
1340   * <p>
1341   * Description: <b>A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text</b><br>
1342   * Type: <b>string</b><br>
1343   * Path: <b>Practitioner.address</b><br>
1344   * </p>
1345   */
1346  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS);
1347
1348 /**
1349   * Search parameter: <b>address-state</b>
1350   * <p>
1351   * Description: <b>A state specified in an address</b><br>
1352   * Type: <b>string</b><br>
1353   * Path: <b>Practitioner.address.state</b><br>
1354   * </p>
1355   */
1356  @SearchParamDefinition(name="address-state", path="Practitioner.address.state", description="A state specified in an address", type="string" )
1357  public static final String SP_ADDRESS_STATE = "address-state";
1358 /**
1359   * <b>Fluent Client</b> search parameter constant for <b>address-state</b>
1360   * <p>
1361   * Description: <b>A state specified in an address</b><br>
1362   * Type: <b>string</b><br>
1363   * Path: <b>Practitioner.address.state</b><br>
1364   * </p>
1365   */
1366  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_STATE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_STATE);
1367
1368 /**
1369   * Search parameter: <b>gender</b>
1370   * <p>
1371   * Description: <b>Gender of the practitioner</b><br>
1372   * Type: <b>token</b><br>
1373   * Path: <b>Practitioner.gender</b><br>
1374   * </p>
1375   */
1376  @SearchParamDefinition(name="gender", path="Practitioner.gender", description="Gender of the practitioner", type="token" )
1377  public static final String SP_GENDER = "gender";
1378 /**
1379   * <b>Fluent Client</b> search parameter constant for <b>gender</b>
1380   * <p>
1381   * Description: <b>Gender of the practitioner</b><br>
1382   * Type: <b>token</b><br>
1383   * Path: <b>Practitioner.gender</b><br>
1384   * </p>
1385   */
1386  public static final ca.uhn.fhir.rest.gclient.TokenClientParam GENDER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_GENDER);
1387
1388 /**
1389   * Search parameter: <b>active</b>
1390   * <p>
1391   * Description: <b>Whether the practitioner record is active</b><br>
1392   * Type: <b>token</b><br>
1393   * Path: <b>Practitioner.active</b><br>
1394   * </p>
1395   */
1396  @SearchParamDefinition(name="active", path="Practitioner.active", description="Whether the practitioner record is active", type="token" )
1397  public static final String SP_ACTIVE = "active";
1398 /**
1399   * <b>Fluent Client</b> search parameter constant for <b>active</b>
1400   * <p>
1401   * Description: <b>Whether the practitioner record is active</b><br>
1402   * Type: <b>token</b><br>
1403   * Path: <b>Practitioner.active</b><br>
1404   * </p>
1405   */
1406  public static final ca.uhn.fhir.rest.gclient.TokenClientParam ACTIVE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ACTIVE);
1407
1408 /**
1409   * Search parameter: <b>address-postalcode</b>
1410   * <p>
1411   * Description: <b>A postalCode specified in an address</b><br>
1412   * Type: <b>string</b><br>
1413   * Path: <b>Practitioner.address.postalCode</b><br>
1414   * </p>
1415   */
1416  @SearchParamDefinition(name="address-postalcode", path="Practitioner.address.postalCode", description="A postalCode specified in an address", type="string" )
1417  public static final String SP_ADDRESS_POSTALCODE = "address-postalcode";
1418 /**
1419   * <b>Fluent Client</b> search parameter constant for <b>address-postalcode</b>
1420   * <p>
1421   * Description: <b>A postalCode specified in an address</b><br>
1422   * Type: <b>string</b><br>
1423   * Path: <b>Practitioner.address.postalCode</b><br>
1424   * </p>
1425   */
1426  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_POSTALCODE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_POSTALCODE);
1427
1428 /**
1429   * Search parameter: <b>address-country</b>
1430   * <p>
1431   * Description: <b>A country specified in an address</b><br>
1432   * Type: <b>string</b><br>
1433   * Path: <b>Practitioner.address.country</b><br>
1434   * </p>
1435   */
1436  @SearchParamDefinition(name="address-country", path="Practitioner.address.country", description="A country specified in an address", type="string" )
1437  public static final String SP_ADDRESS_COUNTRY = "address-country";
1438 /**
1439   * <b>Fluent Client</b> search parameter constant for <b>address-country</b>
1440   * <p>
1441   * Description: <b>A country specified in an address</b><br>
1442   * Type: <b>string</b><br>
1443   * Path: <b>Practitioner.address.country</b><br>
1444   * </p>
1445   */
1446  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_COUNTRY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_COUNTRY);
1447
1448 /**
1449   * Search parameter: <b>phonetic</b>
1450   * <p>
1451   * Description: <b>A portion of either family or given name using some kind of phonetic matching algorithm</b><br>
1452   * Type: <b>string</b><br>
1453   * Path: <b>Practitioner.name</b><br>
1454   * </p>
1455   */
1456  @SearchParamDefinition(name="phonetic", path="Practitioner.name", description="A portion of either family or given name using some kind of phonetic matching algorithm", type="string" )
1457  public static final String SP_PHONETIC = "phonetic";
1458 /**
1459   * <b>Fluent Client</b> search parameter constant for <b>phonetic</b>
1460   * <p>
1461   * Description: <b>A portion of either family or given name using some kind of phonetic matching algorithm</b><br>
1462   * Type: <b>string</b><br>
1463   * Path: <b>Practitioner.name</b><br>
1464   * </p>
1465   */
1466  public static final ca.uhn.fhir.rest.gclient.StringClientParam PHONETIC = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PHONETIC);
1467
1468 /**
1469   * Search parameter: <b>phone</b>
1470   * <p>
1471   * Description: <b>A value in a phone contact</b><br>
1472   * Type: <b>token</b><br>
1473   * Path: <b>Practitioner.telecom(system=phone)</b><br>
1474   * </p>
1475   */
1476  @SearchParamDefinition(name="phone", path="Practitioner.telecom.where(system='phone')", description="A value in a phone contact", type="token" )
1477  public static final String SP_PHONE = "phone";
1478 /**
1479   * <b>Fluent Client</b> search parameter constant for <b>phone</b>
1480   * <p>
1481   * Description: <b>A value in a phone contact</b><br>
1482   * Type: <b>token</b><br>
1483   * Path: <b>Practitioner.telecom(system=phone)</b><br>
1484   * </p>
1485   */
1486  public static final ca.uhn.fhir.rest.gclient.TokenClientParam PHONE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PHONE);
1487
1488 /**
1489   * Search parameter: <b>name</b>
1490   * <p>
1491   * Description: <b>A server defined search that may match any of the string fields in the HumanName, including family, give, prefix, suffix, suffix, and/or text</b><br>
1492   * Type: <b>string</b><br>
1493   * Path: <b>Practitioner.name</b><br>
1494   * </p>
1495   */
1496  @SearchParamDefinition(name="name", path="Practitioner.name", description="A server defined search that may match any of the string fields in the HumanName, including family, give, prefix, suffix, suffix, and/or text", type="string" )
1497  public static final String SP_NAME = "name";
1498 /**
1499   * <b>Fluent Client</b> search parameter constant for <b>name</b>
1500   * <p>
1501   * Description: <b>A server defined search that may match any of the string fields in the HumanName, including family, give, prefix, suffix, suffix, and/or text</b><br>
1502   * Type: <b>string</b><br>
1503   * Path: <b>Practitioner.name</b><br>
1504   * </p>
1505   */
1506  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
1507
1508 /**
1509   * Search parameter: <b>address-use</b>
1510   * <p>
1511   * Description: <b>A use code specified in an address</b><br>
1512   * Type: <b>token</b><br>
1513   * Path: <b>Practitioner.address.use</b><br>
1514   * </p>
1515   */
1516  @SearchParamDefinition(name="address-use", path="Practitioner.address.use", description="A use code specified in an address", type="token" )
1517  public static final String SP_ADDRESS_USE = "address-use";
1518 /**
1519   * <b>Fluent Client</b> search parameter constant for <b>address-use</b>
1520   * <p>
1521   * Description: <b>A use code specified in an address</b><br>
1522   * Type: <b>token</b><br>
1523   * Path: <b>Practitioner.address.use</b><br>
1524   * </p>
1525   */
1526  public static final ca.uhn.fhir.rest.gclient.TokenClientParam ADDRESS_USE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ADDRESS_USE);
1527
1528 /**
1529   * Search parameter: <b>telecom</b>
1530   * <p>
1531   * Description: <b>The value in any kind of contact</b><br>
1532   * Type: <b>token</b><br>
1533   * Path: <b>Practitioner.telecom</b><br>
1534   * </p>
1535   */
1536  @SearchParamDefinition(name="telecom", path="Practitioner.telecom", description="The value in any kind of contact", type="token" )
1537  public static final String SP_TELECOM = "telecom";
1538 /**
1539   * <b>Fluent Client</b> search parameter constant for <b>telecom</b>
1540   * <p>
1541   * Description: <b>The value in any kind of contact</b><br>
1542   * Type: <b>token</b><br>
1543   * Path: <b>Practitioner.telecom</b><br>
1544   * </p>
1545   */
1546  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TELECOM = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TELECOM);
1547
1548 /**
1549   * Search parameter: <b>family</b>
1550   * <p>
1551   * Description: <b>A portion of the family name</b><br>
1552   * Type: <b>string</b><br>
1553   * Path: <b>Practitioner.name.family</b><br>
1554   * </p>
1555   */
1556  @SearchParamDefinition(name="family", path="Practitioner.name.family", description="A portion of the family name", type="string" )
1557  public static final String SP_FAMILY = "family";
1558 /**
1559   * <b>Fluent Client</b> search parameter constant for <b>family</b>
1560   * <p>
1561   * Description: <b>A portion of the family name</b><br>
1562   * Type: <b>string</b><br>
1563   * Path: <b>Practitioner.name.family</b><br>
1564   * </p>
1565   */
1566  public static final ca.uhn.fhir.rest.gclient.StringClientParam FAMILY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_FAMILY);
1567
1568 /**
1569   * Search parameter: <b>address-city</b>
1570   * <p>
1571   * Description: <b>A city specified in an address</b><br>
1572   * Type: <b>string</b><br>
1573   * Path: <b>Practitioner.address.city</b><br>
1574   * </p>
1575   */
1576  @SearchParamDefinition(name="address-city", path="Practitioner.address.city", description="A city specified in an address", type="string" )
1577  public static final String SP_ADDRESS_CITY = "address-city";
1578 /**
1579   * <b>Fluent Client</b> search parameter constant for <b>address-city</b>
1580   * <p>
1581   * Description: <b>A city specified in an address</b><br>
1582   * Type: <b>string</b><br>
1583   * Path: <b>Practitioner.address.city</b><br>
1584   * </p>
1585   */
1586  public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_CITY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_CITY);
1587
1588 /**
1589   * Search parameter: <b>communication</b>
1590   * <p>
1591   * Description: <b>One of the languages that the practitioner can communicate with</b><br>
1592   * Type: <b>token</b><br>
1593   * Path: <b>Practitioner.communication</b><br>
1594   * </p>
1595   */
1596  @SearchParamDefinition(name="communication", path="Practitioner.communication", description="One of the languages that the practitioner can communicate with", type="token" )
1597  public static final String SP_COMMUNICATION = "communication";
1598 /**
1599   * <b>Fluent Client</b> search parameter constant for <b>communication</b>
1600   * <p>
1601   * Description: <b>One of the languages that the practitioner can communicate with</b><br>
1602   * Type: <b>token</b><br>
1603   * Path: <b>Practitioner.communication</b><br>
1604   * </p>
1605   */
1606  public static final ca.uhn.fhir.rest.gclient.TokenClientParam COMMUNICATION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_COMMUNICATION);
1607
1608 /**
1609   * Search parameter: <b>email</b>
1610   * <p>
1611   * Description: <b>A value in an email contact</b><br>
1612   * Type: <b>token</b><br>
1613   * Path: <b>Practitioner.telecom(system=email)</b><br>
1614   * </p>
1615   */
1616  @SearchParamDefinition(name="email", path="Practitioner.telecom.where(system='email')", description="A value in an email contact", type="token" )
1617  public static final String SP_EMAIL = "email";
1618 /**
1619   * <b>Fluent Client</b> search parameter constant for <b>email</b>
1620   * <p>
1621   * Description: <b>A value in an email contact</b><br>
1622   * Type: <b>token</b><br>
1623   * Path: <b>Practitioner.telecom(system=email)</b><br>
1624   * </p>
1625   */
1626  public static final ca.uhn.fhir.rest.gclient.TokenClientParam EMAIL = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_EMAIL);
1627
1628
1629}
1630