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