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