001package org.hl7.fhir.dstu3.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.1 033 034import java.util.*; 035 036import org.hl7.fhir.utilities.Utilities; 037import ca.uhn.fhir.model.api.annotation.ResourceDef; 038import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 039import ca.uhn.fhir.model.api.annotation.Child; 040import ca.uhn.fhir.model.api.annotation.ChildOrder; 041import ca.uhn.fhir.model.api.annotation.Description; 042import ca.uhn.fhir.model.api.annotation.Block; 043import org.hl7.fhir.instance.model.api.*; 044import org.hl7.fhir.exceptions.FHIRException; 045import org.hl7.fhir.exceptions.FHIRFormatError; 046/** 047 * Record details about the anatomical location of a specimen or body part. This resource may be used when a coded concept does not provide the necessary detail needed for the use case. 048 */ 049@ResourceDef(name="BodySite", profile="http://hl7.org/fhir/StructureDefinition/BodySite") 050public class BodySite extends DomainResource { 051 052 /** 053 * Identifier for this instance of the anatomical location. 054 */ 055 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 056 @Description(shortDefinition="Bodysite identifier", formalDefinition="Identifier for this instance of the anatomical location." ) 057 protected List<Identifier> identifier; 058 059 /** 060 * Whether this body site is in active use. 061 */ 062 @Child(name = "active", type = {BooleanType.class}, order=1, min=0, max=1, modifier=true, summary=true) 063 @Description(shortDefinition="Whether this body site record is in active use", formalDefinition="Whether this body site is in active use." ) 064 protected BooleanType active; 065 066 /** 067 * Named anatomical location - ideally coded where possible. 068 */ 069 @Child(name = "code", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) 070 @Description(shortDefinition="Named anatomical location", formalDefinition="Named anatomical location - ideally coded where possible." ) 071 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/body-site") 072 protected CodeableConcept code; 073 074 /** 075 * Qualifier to refine the anatomical location. These include qualifiers for laterality, relative location, directionality, number, and plane. 076 */ 077 @Child(name = "qualifier", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 078 @Description(shortDefinition="Modification to location code", formalDefinition="Qualifier to refine the anatomical location. These include qualifiers for laterality, relative location, directionality, number, and plane." ) 079 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/bodysite-relative-location") 080 protected List<CodeableConcept> qualifier; 081 082 /** 083 * A summary, charactarization or explanation of the anatomic location. 084 */ 085 @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) 086 @Description(shortDefinition="Anatomical location description", formalDefinition="A summary, charactarization or explanation of the anatomic location." ) 087 protected StringType description; 088 089 /** 090 * Image or images used to identify a location. 091 */ 092 @Child(name = "image", type = {Attachment.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 093 @Description(shortDefinition="Attached images", formalDefinition="Image or images used to identify a location." ) 094 protected List<Attachment> image; 095 096 /** 097 * The person to which the body site belongs. 098 */ 099 @Child(name = "patient", type = {Patient.class}, order=6, min=1, max=1, modifier=false, summary=true) 100 @Description(shortDefinition="Who this is about", formalDefinition="The person to which the body site belongs." ) 101 protected Reference patient; 102 103 /** 104 * The actual object that is the target of the reference (The person to which the body site belongs.) 105 */ 106 protected Patient patientTarget; 107 108 private static final long serialVersionUID = -871837171L; 109 110 /** 111 * Constructor 112 */ 113 public BodySite() { 114 super(); 115 } 116 117 /** 118 * Constructor 119 */ 120 public BodySite(Reference patient) { 121 super(); 122 this.patient = patient; 123 } 124 125 /** 126 * @return {@link #identifier} (Identifier for this instance of the anatomical location.) 127 */ 128 public List<Identifier> getIdentifier() { 129 if (this.identifier == null) 130 this.identifier = new ArrayList<Identifier>(); 131 return this.identifier; 132 } 133 134 /** 135 * @return Returns a reference to <code>this</code> for easy method chaining 136 */ 137 public BodySite setIdentifier(List<Identifier> theIdentifier) { 138 this.identifier = theIdentifier; 139 return this; 140 } 141 142 public boolean hasIdentifier() { 143 if (this.identifier == null) 144 return false; 145 for (Identifier item : this.identifier) 146 if (!item.isEmpty()) 147 return true; 148 return false; 149 } 150 151 public Identifier addIdentifier() { //3 152 Identifier t = new Identifier(); 153 if (this.identifier == null) 154 this.identifier = new ArrayList<Identifier>(); 155 this.identifier.add(t); 156 return t; 157 } 158 159 public BodySite addIdentifier(Identifier t) { //3 160 if (t == null) 161 return this; 162 if (this.identifier == null) 163 this.identifier = new ArrayList<Identifier>(); 164 this.identifier.add(t); 165 return this; 166 } 167 168 /** 169 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 170 */ 171 public Identifier getIdentifierFirstRep() { 172 if (getIdentifier().isEmpty()) { 173 addIdentifier(); 174 } 175 return getIdentifier().get(0); 176 } 177 178 /** 179 * @return {@link #active} (Whether this body site is in active use.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value 180 */ 181 public BooleanType getActiveElement() { 182 if (this.active == null) 183 if (Configuration.errorOnAutoCreate()) 184 throw new Error("Attempt to auto-create BodySite.active"); 185 else if (Configuration.doAutoCreate()) 186 this.active = new BooleanType(); // bb 187 return this.active; 188 } 189 190 public boolean hasActiveElement() { 191 return this.active != null && !this.active.isEmpty(); 192 } 193 194 public boolean hasActive() { 195 return this.active != null && !this.active.isEmpty(); 196 } 197 198 /** 199 * @param value {@link #active} (Whether this body site is in active use.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value 200 */ 201 public BodySite setActiveElement(BooleanType value) { 202 this.active = value; 203 return this; 204 } 205 206 /** 207 * @return Whether this body site is in active use. 208 */ 209 public boolean getActive() { 210 return this.active == null || this.active.isEmpty() ? false : this.active.getValue(); 211 } 212 213 /** 214 * @param value Whether this body site is in active use. 215 */ 216 public BodySite setActive(boolean value) { 217 if (this.active == null) 218 this.active = new BooleanType(); 219 this.active.setValue(value); 220 return this; 221 } 222 223 /** 224 * @return {@link #code} (Named anatomical location - ideally coded where possible.) 225 */ 226 public CodeableConcept getCode() { 227 if (this.code == null) 228 if (Configuration.errorOnAutoCreate()) 229 throw new Error("Attempt to auto-create BodySite.code"); 230 else if (Configuration.doAutoCreate()) 231 this.code = new CodeableConcept(); // cc 232 return this.code; 233 } 234 235 public boolean hasCode() { 236 return this.code != null && !this.code.isEmpty(); 237 } 238 239 /** 240 * @param value {@link #code} (Named anatomical location - ideally coded where possible.) 241 */ 242 public BodySite setCode(CodeableConcept value) { 243 this.code = value; 244 return this; 245 } 246 247 /** 248 * @return {@link #qualifier} (Qualifier to refine the anatomical location. These include qualifiers for laterality, relative location, directionality, number, and plane.) 249 */ 250 public List<CodeableConcept> getQualifier() { 251 if (this.qualifier == null) 252 this.qualifier = new ArrayList<CodeableConcept>(); 253 return this.qualifier; 254 } 255 256 /** 257 * @return Returns a reference to <code>this</code> for easy method chaining 258 */ 259 public BodySite setQualifier(List<CodeableConcept> theQualifier) { 260 this.qualifier = theQualifier; 261 return this; 262 } 263 264 public boolean hasQualifier() { 265 if (this.qualifier == null) 266 return false; 267 for (CodeableConcept item : this.qualifier) 268 if (!item.isEmpty()) 269 return true; 270 return false; 271 } 272 273 public CodeableConcept addQualifier() { //3 274 CodeableConcept t = new CodeableConcept(); 275 if (this.qualifier == null) 276 this.qualifier = new ArrayList<CodeableConcept>(); 277 this.qualifier.add(t); 278 return t; 279 } 280 281 public BodySite addQualifier(CodeableConcept t) { //3 282 if (t == null) 283 return this; 284 if (this.qualifier == null) 285 this.qualifier = new ArrayList<CodeableConcept>(); 286 this.qualifier.add(t); 287 return this; 288 } 289 290 /** 291 * @return The first repetition of repeating field {@link #qualifier}, creating it if it does not already exist 292 */ 293 public CodeableConcept getQualifierFirstRep() { 294 if (getQualifier().isEmpty()) { 295 addQualifier(); 296 } 297 return getQualifier().get(0); 298 } 299 300 /** 301 * @return {@link #description} (A summary, charactarization or explanation of the anatomic location.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 302 */ 303 public StringType getDescriptionElement() { 304 if (this.description == null) 305 if (Configuration.errorOnAutoCreate()) 306 throw new Error("Attempt to auto-create BodySite.description"); 307 else if (Configuration.doAutoCreate()) 308 this.description = new StringType(); // bb 309 return this.description; 310 } 311 312 public boolean hasDescriptionElement() { 313 return this.description != null && !this.description.isEmpty(); 314 } 315 316 public boolean hasDescription() { 317 return this.description != null && !this.description.isEmpty(); 318 } 319 320 /** 321 * @param value {@link #description} (A summary, charactarization or explanation of the anatomic location.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 322 */ 323 public BodySite setDescriptionElement(StringType value) { 324 this.description = value; 325 return this; 326 } 327 328 /** 329 * @return A summary, charactarization or explanation of the anatomic location. 330 */ 331 public String getDescription() { 332 return this.description == null ? null : this.description.getValue(); 333 } 334 335 /** 336 * @param value A summary, charactarization or explanation of the anatomic location. 337 */ 338 public BodySite setDescription(String value) { 339 if (Utilities.noString(value)) 340 this.description = null; 341 else { 342 if (this.description == null) 343 this.description = new StringType(); 344 this.description.setValue(value); 345 } 346 return this; 347 } 348 349 /** 350 * @return {@link #image} (Image or images used to identify a location.) 351 */ 352 public List<Attachment> getImage() { 353 if (this.image == null) 354 this.image = new ArrayList<Attachment>(); 355 return this.image; 356 } 357 358 /** 359 * @return Returns a reference to <code>this</code> for easy method chaining 360 */ 361 public BodySite setImage(List<Attachment> theImage) { 362 this.image = theImage; 363 return this; 364 } 365 366 public boolean hasImage() { 367 if (this.image == null) 368 return false; 369 for (Attachment item : this.image) 370 if (!item.isEmpty()) 371 return true; 372 return false; 373 } 374 375 public Attachment addImage() { //3 376 Attachment t = new Attachment(); 377 if (this.image == null) 378 this.image = new ArrayList<Attachment>(); 379 this.image.add(t); 380 return t; 381 } 382 383 public BodySite addImage(Attachment t) { //3 384 if (t == null) 385 return this; 386 if (this.image == null) 387 this.image = new ArrayList<Attachment>(); 388 this.image.add(t); 389 return this; 390 } 391 392 /** 393 * @return The first repetition of repeating field {@link #image}, creating it if it does not already exist 394 */ 395 public Attachment getImageFirstRep() { 396 if (getImage().isEmpty()) { 397 addImage(); 398 } 399 return getImage().get(0); 400 } 401 402 /** 403 * @return {@link #patient} (The person to which the body site belongs.) 404 */ 405 public Reference getPatient() { 406 if (this.patient == null) 407 if (Configuration.errorOnAutoCreate()) 408 throw new Error("Attempt to auto-create BodySite.patient"); 409 else if (Configuration.doAutoCreate()) 410 this.patient = new Reference(); // cc 411 return this.patient; 412 } 413 414 public boolean hasPatient() { 415 return this.patient != null && !this.patient.isEmpty(); 416 } 417 418 /** 419 * @param value {@link #patient} (The person to which the body site belongs.) 420 */ 421 public BodySite setPatient(Reference value) { 422 this.patient = value; 423 return this; 424 } 425 426 /** 427 * @return {@link #patient} 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 person to which the body site belongs.) 428 */ 429 public Patient getPatientTarget() { 430 if (this.patientTarget == null) 431 if (Configuration.errorOnAutoCreate()) 432 throw new Error("Attempt to auto-create BodySite.patient"); 433 else if (Configuration.doAutoCreate()) 434 this.patientTarget = new Patient(); // aa 435 return this.patientTarget; 436 } 437 438 /** 439 * @param value {@link #patient} 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 person to which the body site belongs.) 440 */ 441 public BodySite setPatientTarget(Patient value) { 442 this.patientTarget = value; 443 return this; 444 } 445 446 protected void listChildren(List<Property> children) { 447 super.listChildren(children); 448 children.add(new Property("identifier", "Identifier", "Identifier for this instance of the anatomical location.", 0, java.lang.Integer.MAX_VALUE, identifier)); 449 children.add(new Property("active", "boolean", "Whether this body site is in active use.", 0, 1, active)); 450 children.add(new Property("code", "CodeableConcept", "Named anatomical location - ideally coded where possible.", 0, 1, code)); 451 children.add(new Property("qualifier", "CodeableConcept", "Qualifier to refine the anatomical location. These include qualifiers for laterality, relative location, directionality, number, and plane.", 0, java.lang.Integer.MAX_VALUE, qualifier)); 452 children.add(new Property("description", "string", "A summary, charactarization or explanation of the anatomic location.", 0, 1, description)); 453 children.add(new Property("image", "Attachment", "Image or images used to identify a location.", 0, java.lang.Integer.MAX_VALUE, image)); 454 children.add(new Property("patient", "Reference(Patient)", "The person to which the body site belongs.", 0, 1, patient)); 455 } 456 457 @Override 458 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 459 switch (_hash) { 460 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Identifier for this instance of the anatomical location.", 0, java.lang.Integer.MAX_VALUE, identifier); 461 case -1422950650: /*active*/ return new Property("active", "boolean", "Whether this body site is in active use.", 0, 1, active); 462 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "Named anatomical location - ideally coded where possible.", 0, 1, code); 463 case -1247940438: /*qualifier*/ return new Property("qualifier", "CodeableConcept", "Qualifier to refine the anatomical location. These include qualifiers for laterality, relative location, directionality, number, and plane.", 0, java.lang.Integer.MAX_VALUE, qualifier); 464 case -1724546052: /*description*/ return new Property("description", "string", "A summary, charactarization or explanation of the anatomic location.", 0, 1, description); 465 case 100313435: /*image*/ return new Property("image", "Attachment", "Image or images used to identify a location.", 0, java.lang.Integer.MAX_VALUE, image); 466 case -791418107: /*patient*/ return new Property("patient", "Reference(Patient)", "The person to which the body site belongs.", 0, 1, patient); 467 default: return super.getNamedProperty(_hash, _name, _checkValid); 468 } 469 470 } 471 472 @Override 473 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 474 switch (hash) { 475 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 476 case -1422950650: /*active*/ return this.active == null ? new Base[0] : new Base[] {this.active}; // BooleanType 477 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept 478 case -1247940438: /*qualifier*/ return this.qualifier == null ? new Base[0] : this.qualifier.toArray(new Base[this.qualifier.size()]); // CodeableConcept 479 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 480 case 100313435: /*image*/ return this.image == null ? new Base[0] : this.image.toArray(new Base[this.image.size()]); // Attachment 481 case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference 482 default: return super.getProperty(hash, name, checkValid); 483 } 484 485 } 486 487 @Override 488 public Base setProperty(int hash, String name, Base value) throws FHIRException { 489 switch (hash) { 490 case -1618432855: // identifier 491 this.getIdentifier().add(castToIdentifier(value)); // Identifier 492 return value; 493 case -1422950650: // active 494 this.active = castToBoolean(value); // BooleanType 495 return value; 496 case 3059181: // code 497 this.code = castToCodeableConcept(value); // CodeableConcept 498 return value; 499 case -1247940438: // qualifier 500 this.getQualifier().add(castToCodeableConcept(value)); // CodeableConcept 501 return value; 502 case -1724546052: // description 503 this.description = castToString(value); // StringType 504 return value; 505 case 100313435: // image 506 this.getImage().add(castToAttachment(value)); // Attachment 507 return value; 508 case -791418107: // patient 509 this.patient = castToReference(value); // Reference 510 return value; 511 default: return super.setProperty(hash, name, value); 512 } 513 514 } 515 516 @Override 517 public Base setProperty(String name, Base value) throws FHIRException { 518 if (name.equals("identifier")) { 519 this.getIdentifier().add(castToIdentifier(value)); 520 } else if (name.equals("active")) { 521 this.active = castToBoolean(value); // BooleanType 522 } else if (name.equals("code")) { 523 this.code = castToCodeableConcept(value); // CodeableConcept 524 } else if (name.equals("qualifier")) { 525 this.getQualifier().add(castToCodeableConcept(value)); 526 } else if (name.equals("description")) { 527 this.description = castToString(value); // StringType 528 } else if (name.equals("image")) { 529 this.getImage().add(castToAttachment(value)); 530 } else if (name.equals("patient")) { 531 this.patient = castToReference(value); // Reference 532 } else 533 return super.setProperty(name, value); 534 return value; 535 } 536 537 @Override 538 public Base makeProperty(int hash, String name) throws FHIRException { 539 switch (hash) { 540 case -1618432855: return addIdentifier(); 541 case -1422950650: return getActiveElement(); 542 case 3059181: return getCode(); 543 case -1247940438: return addQualifier(); 544 case -1724546052: return getDescriptionElement(); 545 case 100313435: return addImage(); 546 case -791418107: return getPatient(); 547 default: return super.makeProperty(hash, name); 548 } 549 550 } 551 552 @Override 553 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 554 switch (hash) { 555 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 556 case -1422950650: /*active*/ return new String[] {"boolean"}; 557 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 558 case -1247940438: /*qualifier*/ return new String[] {"CodeableConcept"}; 559 case -1724546052: /*description*/ return new String[] {"string"}; 560 case 100313435: /*image*/ return new String[] {"Attachment"}; 561 case -791418107: /*patient*/ return new String[] {"Reference"}; 562 default: return super.getTypesForProperty(hash, name); 563 } 564 565 } 566 567 @Override 568 public Base addChild(String name) throws FHIRException { 569 if (name.equals("identifier")) { 570 return addIdentifier(); 571 } 572 else if (name.equals("active")) { 573 throw new FHIRException("Cannot call addChild on a primitive type BodySite.active"); 574 } 575 else if (name.equals("code")) { 576 this.code = new CodeableConcept(); 577 return this.code; 578 } 579 else if (name.equals("qualifier")) { 580 return addQualifier(); 581 } 582 else if (name.equals("description")) { 583 throw new FHIRException("Cannot call addChild on a primitive type BodySite.description"); 584 } 585 else if (name.equals("image")) { 586 return addImage(); 587 } 588 else if (name.equals("patient")) { 589 this.patient = new Reference(); 590 return this.patient; 591 } 592 else 593 return super.addChild(name); 594 } 595 596 public String fhirType() { 597 return "BodySite"; 598 599 } 600 601 public BodySite copy() { 602 BodySite dst = new BodySite(); 603 copyValues(dst); 604 if (identifier != null) { 605 dst.identifier = new ArrayList<Identifier>(); 606 for (Identifier i : identifier) 607 dst.identifier.add(i.copy()); 608 }; 609 dst.active = active == null ? null : active.copy(); 610 dst.code = code == null ? null : code.copy(); 611 if (qualifier != null) { 612 dst.qualifier = new ArrayList<CodeableConcept>(); 613 for (CodeableConcept i : qualifier) 614 dst.qualifier.add(i.copy()); 615 }; 616 dst.description = description == null ? null : description.copy(); 617 if (image != null) { 618 dst.image = new ArrayList<Attachment>(); 619 for (Attachment i : image) 620 dst.image.add(i.copy()); 621 }; 622 dst.patient = patient == null ? null : patient.copy(); 623 return dst; 624 } 625 626 protected BodySite typedCopy() { 627 return copy(); 628 } 629 630 @Override 631 public boolean equalsDeep(Base other_) { 632 if (!super.equalsDeep(other_)) 633 return false; 634 if (!(other_ instanceof BodySite)) 635 return false; 636 BodySite o = (BodySite) other_; 637 return compareDeep(identifier, o.identifier, true) && compareDeep(active, o.active, true) && compareDeep(code, o.code, true) 638 && compareDeep(qualifier, o.qualifier, true) && compareDeep(description, o.description, true) && compareDeep(image, o.image, true) 639 && compareDeep(patient, o.patient, true); 640 } 641 642 @Override 643 public boolean equalsShallow(Base other_) { 644 if (!super.equalsShallow(other_)) 645 return false; 646 if (!(other_ instanceof BodySite)) 647 return false; 648 BodySite o = (BodySite) other_; 649 return compareValues(active, o.active, true) && compareValues(description, o.description, true); 650 } 651 652 public boolean isEmpty() { 653 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, active, code 654 , qualifier, description, image, patient); 655 } 656 657 @Override 658 public ResourceType getResourceType() { 659 return ResourceType.BodySite; 660 } 661 662 /** 663 * Search parameter: <b>identifier</b> 664 * <p> 665 * Description: <b>Identifier for this instance of the anatomical location</b><br> 666 * Type: <b>token</b><br> 667 * Path: <b>BodySite.identifier</b><br> 668 * </p> 669 */ 670 @SearchParamDefinition(name="identifier", path="BodySite.identifier", description="Identifier for this instance of the anatomical location", type="token" ) 671 public static final String SP_IDENTIFIER = "identifier"; 672 /** 673 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 674 * <p> 675 * Description: <b>Identifier for this instance of the anatomical location</b><br> 676 * Type: <b>token</b><br> 677 * Path: <b>BodySite.identifier</b><br> 678 * </p> 679 */ 680 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 681 682 /** 683 * Search parameter: <b>code</b> 684 * <p> 685 * Description: <b>Named anatomical location</b><br> 686 * Type: <b>token</b><br> 687 * Path: <b>BodySite.code</b><br> 688 * </p> 689 */ 690 @SearchParamDefinition(name="code", path="BodySite.code", description="Named anatomical location", type="token" ) 691 public static final String SP_CODE = "code"; 692 /** 693 * <b>Fluent Client</b> search parameter constant for <b>code</b> 694 * <p> 695 * Description: <b>Named anatomical location</b><br> 696 * Type: <b>token</b><br> 697 * Path: <b>BodySite.code</b><br> 698 * </p> 699 */ 700 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE); 701 702 /** 703 * Search parameter: <b>patient</b> 704 * <p> 705 * Description: <b>Patient to whom bodysite belongs</b><br> 706 * Type: <b>reference</b><br> 707 * Path: <b>BodySite.patient</b><br> 708 * </p> 709 */ 710 @SearchParamDefinition(name="patient", path="BodySite.patient", description="Patient to whom bodysite belongs", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Patient.class } ) 711 public static final String SP_PATIENT = "patient"; 712 /** 713 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 714 * <p> 715 * Description: <b>Patient to whom bodysite belongs</b><br> 716 * Type: <b>reference</b><br> 717 * Path: <b>BodySite.patient</b><br> 718 * </p> 719 */ 720 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 721 722/** 723 * Constant for fluent queries to be used to add include statements. Specifies 724 * the path value of "<b>BodySite:patient</b>". 725 */ 726 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("BodySite:patient").toLocked(); 727 728 729} 730