001package org.hl7.fhir.r4.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 Sun, May 6, 2018 17:51-0400 for FHIR v3.4.0 033 034import java.util.*; 035 036import ca.uhn.fhir.model.api.annotation.ResourceDef; 037import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 038import ca.uhn.fhir.model.api.annotation.Child; 039import ca.uhn.fhir.model.api.annotation.ChildOrder; 040import ca.uhn.fhir.model.api.annotation.Description; 041import ca.uhn.fhir.model.api.annotation.Block; 042import org.hl7.fhir.instance.model.api.*; 043import org.hl7.fhir.exceptions.FHIRException; 044/** 045 * Catalog entries are wrappers that contextualize items included in a catalog. 046 */ 047@ResourceDef(name="EntryDefinition", profile="http://hl7.org/fhir/Profile/EntryDefinition") 048public class EntryDefinition extends DomainResource { 049 050 @Block() 051 public static class EntryDefinitionRelatedEntryComponent extends BackboneElement implements IBaseBackboneElement { 052 /** 053 * The type of relation to the related item: child, parent, packageContent, containerPackage, usedIn, uses, requires, etc. 054 */ 055 @Child(name = "relationtype", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) 056 @Description(shortDefinition="The type of relation to the related item", formalDefinition="The type of relation to the related item: child, parent, packageContent, containerPackage, usedIn, uses, requires, etc." ) 057 protected CodeableConcept relationtype; 058 059 /** 060 * The reference to the related item. 061 */ 062 @Child(name = "item", type = {EntryDefinition.class}, order=2, min=1, max=1, modifier=false, summary=true) 063 @Description(shortDefinition="The reference to the related item", formalDefinition="The reference to the related item." ) 064 protected Reference item; 065 066 /** 067 * The actual object that is the target of the reference (The reference to the related item.) 068 */ 069 protected EntryDefinition itemTarget; 070 071 private static final long serialVersionUID = -1871051942L; 072 073 /** 074 * Constructor 075 */ 076 public EntryDefinitionRelatedEntryComponent() { 077 super(); 078 } 079 080 /** 081 * Constructor 082 */ 083 public EntryDefinitionRelatedEntryComponent(CodeableConcept relationtype, Reference item) { 084 super(); 085 this.relationtype = relationtype; 086 this.item = item; 087 } 088 089 /** 090 * @return {@link #relationtype} (The type of relation to the related item: child, parent, packageContent, containerPackage, usedIn, uses, requires, etc.) 091 */ 092 public CodeableConcept getRelationtype() { 093 if (this.relationtype == null) 094 if (Configuration.errorOnAutoCreate()) 095 throw new Error("Attempt to auto-create EntryDefinitionRelatedEntryComponent.relationtype"); 096 else if (Configuration.doAutoCreate()) 097 this.relationtype = new CodeableConcept(); // cc 098 return this.relationtype; 099 } 100 101 public boolean hasRelationtype() { 102 return this.relationtype != null && !this.relationtype.isEmpty(); 103 } 104 105 /** 106 * @param value {@link #relationtype} (The type of relation to the related item: child, parent, packageContent, containerPackage, usedIn, uses, requires, etc.) 107 */ 108 public EntryDefinitionRelatedEntryComponent setRelationtype(CodeableConcept value) { 109 this.relationtype = value; 110 return this; 111 } 112 113 /** 114 * @return {@link #item} (The reference to the related item.) 115 */ 116 public Reference getItem() { 117 if (this.item == null) 118 if (Configuration.errorOnAutoCreate()) 119 throw new Error("Attempt to auto-create EntryDefinitionRelatedEntryComponent.item"); 120 else if (Configuration.doAutoCreate()) 121 this.item = new Reference(); // cc 122 return this.item; 123 } 124 125 public boolean hasItem() { 126 return this.item != null && !this.item.isEmpty(); 127 } 128 129 /** 130 * @param value {@link #item} (The reference to the related item.) 131 */ 132 public EntryDefinitionRelatedEntryComponent setItem(Reference value) { 133 this.item = value; 134 return this; 135 } 136 137 /** 138 * @return {@link #item} 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 reference to the related item.) 139 */ 140 public EntryDefinition getItemTarget() { 141 if (this.itemTarget == null) 142 if (Configuration.errorOnAutoCreate()) 143 throw new Error("Attempt to auto-create EntryDefinitionRelatedEntryComponent.item"); 144 else if (Configuration.doAutoCreate()) 145 this.itemTarget = new EntryDefinition(); // aa 146 return this.itemTarget; 147 } 148 149 /** 150 * @param value {@link #item} 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 reference to the related item.) 151 */ 152 public EntryDefinitionRelatedEntryComponent setItemTarget(EntryDefinition value) { 153 this.itemTarget = value; 154 return this; 155 } 156 157 protected void listChildren(List<Property> children) { 158 super.listChildren(children); 159 children.add(new Property("relationtype", "CodeableConcept", "The type of relation to the related item: child, parent, packageContent, containerPackage, usedIn, uses, requires, etc.", 0, 1, relationtype)); 160 children.add(new Property("item", "Reference(EntryDefinition)", "The reference to the related item.", 0, 1, item)); 161 } 162 163 @Override 164 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 165 switch (_hash) { 166 case -261805258: /*relationtype*/ return new Property("relationtype", "CodeableConcept", "The type of relation to the related item: child, parent, packageContent, containerPackage, usedIn, uses, requires, etc.", 0, 1, relationtype); 167 case 3242771: /*item*/ return new Property("item", "Reference(EntryDefinition)", "The reference to the related item.", 0, 1, item); 168 default: return super.getNamedProperty(_hash, _name, _checkValid); 169 } 170 171 } 172 173 @Override 174 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 175 switch (hash) { 176 case -261805258: /*relationtype*/ return this.relationtype == null ? new Base[0] : new Base[] {this.relationtype}; // CodeableConcept 177 case 3242771: /*item*/ return this.item == null ? new Base[0] : new Base[] {this.item}; // Reference 178 default: return super.getProperty(hash, name, checkValid); 179 } 180 181 } 182 183 @Override 184 public Base setProperty(int hash, String name, Base value) throws FHIRException { 185 switch (hash) { 186 case -261805258: // relationtype 187 this.relationtype = castToCodeableConcept(value); // CodeableConcept 188 return value; 189 case 3242771: // item 190 this.item = castToReference(value); // Reference 191 return value; 192 default: return super.setProperty(hash, name, value); 193 } 194 195 } 196 197 @Override 198 public Base setProperty(String name, Base value) throws FHIRException { 199 if (name.equals("relationtype")) { 200 this.relationtype = castToCodeableConcept(value); // CodeableConcept 201 } else if (name.equals("item")) { 202 this.item = castToReference(value); // Reference 203 } else 204 return super.setProperty(name, value); 205 return value; 206 } 207 208 @Override 209 public Base makeProperty(int hash, String name) throws FHIRException { 210 switch (hash) { 211 case -261805258: return getRelationtype(); 212 case 3242771: return getItem(); 213 default: return super.makeProperty(hash, name); 214 } 215 216 } 217 218 @Override 219 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 220 switch (hash) { 221 case -261805258: /*relationtype*/ return new String[] {"CodeableConcept"}; 222 case 3242771: /*item*/ return new String[] {"Reference"}; 223 default: return super.getTypesForProperty(hash, name); 224 } 225 226 } 227 228 @Override 229 public Base addChild(String name) throws FHIRException { 230 if (name.equals("relationtype")) { 231 this.relationtype = new CodeableConcept(); 232 return this.relationtype; 233 } 234 else if (name.equals("item")) { 235 this.item = new Reference(); 236 return this.item; 237 } 238 else 239 return super.addChild(name); 240 } 241 242 public EntryDefinitionRelatedEntryComponent copy() { 243 EntryDefinitionRelatedEntryComponent dst = new EntryDefinitionRelatedEntryComponent(); 244 copyValues(dst); 245 dst.relationtype = relationtype == null ? null : relationtype.copy(); 246 dst.item = item == null ? null : item.copy(); 247 return dst; 248 } 249 250 @Override 251 public boolean equalsDeep(Base other_) { 252 if (!super.equalsDeep(other_)) 253 return false; 254 if (!(other_ instanceof EntryDefinitionRelatedEntryComponent)) 255 return false; 256 EntryDefinitionRelatedEntryComponent o = (EntryDefinitionRelatedEntryComponent) other_; 257 return compareDeep(relationtype, o.relationtype, true) && compareDeep(item, o.item, true); 258 } 259 260 @Override 261 public boolean equalsShallow(Base other_) { 262 if (!super.equalsShallow(other_)) 263 return false; 264 if (!(other_ instanceof EntryDefinitionRelatedEntryComponent)) 265 return false; 266 EntryDefinitionRelatedEntryComponent o = (EntryDefinitionRelatedEntryComponent) other_; 267 return true; 268 } 269 270 public boolean isEmpty() { 271 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(relationtype, item); 272 } 273 274 public String fhirType() { 275 return "EntryDefinition.relatedEntry"; 276 277 } 278 279 } 280 281 /** 282 * The type of item - medication, device, service, protocol or other. 283 */ 284 @Child(name = "type", type = {CodeableConcept.class}, order=0, min=0, max=1, modifier=false, summary=true) 285 @Description(shortDefinition="The type of item - medication, device, service, protocol or other", formalDefinition="The type of item - medication, device, service, protocol or other." ) 286 protected CodeableConcept type; 287 288 /** 289 * Whether the entry represents an orderable item, or other. 290 */ 291 @Child(name = "purpose", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) 292 @Description(shortDefinition="Whether the entry represents an orderable item, or other", formalDefinition="Whether the entry represents an orderable item, or other." ) 293 protected CodeableConcept purpose; 294 295 /** 296 * Content of the catalog. 297 */ 298 @Child(name = "referencedItem", type = {Medication.class, Device.class, Organization.class, Practitioner.class, HealthcareService.class, ActivityDefinition.class, PlanDefinition.class, SpecimenDefinition.class, ObservationDefinition.class, Binary.class}, order=2, min=1, max=1, modifier=false, summary=true) 299 @Description(shortDefinition="The item itself", formalDefinition="Content of the catalog." ) 300 protected Reference referencedItem; 301 302 /** 303 * The actual object that is the target of the reference (Content of the catalog.) 304 */ 305 protected Resource referencedItemTarget; 306 307 /** 308 * Used in supporting different identifiers for the same product, e.g. manufacturer code and retailer code. 309 */ 310 @Child(name = "identifier", type = {Identifier.class}, order=3, min=0, max=1, modifier=false, summary=true) 311 @Description(shortDefinition="Unique identifier of the catalog item", formalDefinition="Used in supporting different identifiers for the same product, e.g. manufacturer code and retailer code." ) 312 protected Identifier identifier; 313 314 /** 315 * Used in supporting related concepts, e.g. NDC to RxNorm. 316 */ 317 @Child(name = "additionalIdentifier", type = {Identifier.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 318 @Description(shortDefinition="Any additional identifier(s) for the catalog item, in the same granularity or concept", formalDefinition="Used in supporting related concepts, e.g. NDC to RxNorm." ) 319 protected List<Identifier> additionalIdentifier; 320 321 /** 322 * Classes of devices, or ATC for medication. 323 */ 324 @Child(name = "classification", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 325 @Description(shortDefinition="Classification (category or class) of the item entry", formalDefinition="Classes of devices, or ATC for medication." ) 326 protected List<CodeableConcept> classification; 327 328 /** 329 * Used to support catalog exchange even for unsupported products, e.g. getting list of medications even if not prescribable. 330 */ 331 @Child(name = "status", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=true) 332 @Description(shortDefinition="The status of the item, e.g. active, approved, deleted…", formalDefinition="Used to support catalog exchange even for unsupported products, e.g. getting list of medications even if not prescribable." ) 333 protected CodeableConcept status; 334 335 /** 336 * The time period in which this catalog entry is expected to be active. 337 */ 338 @Child(name = "validityPeriod", type = {Period.class}, order=7, min=0, max=1, modifier=false, summary=true) 339 @Description(shortDefinition="The time period in which this catalog entry is expected to be active", formalDefinition="The time period in which this catalog entry is expected to be active." ) 340 protected Period validityPeriod; 341 342 /** 343 * Typically date of issue is different from the beginning of the validity. This can be used to see when an item was last updated. 344 */ 345 @Child(name = "lastUpdated", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true) 346 @Description(shortDefinition="When was this catalog last updated", formalDefinition="Typically date of issue is different from the beginning of the validity. This can be used to see when an item was last updated." ) 347 protected DateTimeType lastUpdated; 348 349 /** 350 * Used for examplefor Out of Formulary, or any specifics. 351 */ 352 @Child(name = "additionalCharacteristic", type = {CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 353 @Description(shortDefinition="Additional characteristics of the catalog entry", formalDefinition="Used for examplefor Out of Formulary, or any specifics." ) 354 protected List<CodeableConcept> additionalCharacteristic; 355 356 /** 357 * User for example for ATC classification, or. 358 */ 359 @Child(name = "additionalClassification", type = {CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 360 @Description(shortDefinition="Additional classification of the catalog entry", formalDefinition="User for example for ATC classification, or." ) 361 protected List<CodeableConcept> additionalClassification; 362 363 /** 364 * Used for example, to point to a substance, or to a device used to administer a medication. 365 */ 366 @Child(name = "relatedEntry", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 367 @Description(shortDefinition="An item that this catalog entry is related to", formalDefinition="Used for example, to point to a substance, or to a device used to administer a medication." ) 368 protected List<EntryDefinitionRelatedEntryComponent> relatedEntry; 369 370 private static final long serialVersionUID = 1643677246L; 371 372 /** 373 * Constructor 374 */ 375 public EntryDefinition() { 376 super(); 377 } 378 379 /** 380 * Constructor 381 */ 382 public EntryDefinition(CodeableConcept purpose, Reference referencedItem) { 383 super(); 384 this.purpose = purpose; 385 this.referencedItem = referencedItem; 386 } 387 388 /** 389 * @return {@link #type} (The type of item - medication, device, service, protocol or other.) 390 */ 391 public CodeableConcept getType() { 392 if (this.type == null) 393 if (Configuration.errorOnAutoCreate()) 394 throw new Error("Attempt to auto-create EntryDefinition.type"); 395 else if (Configuration.doAutoCreate()) 396 this.type = new CodeableConcept(); // cc 397 return this.type; 398 } 399 400 public boolean hasType() { 401 return this.type != null && !this.type.isEmpty(); 402 } 403 404 /** 405 * @param value {@link #type} (The type of item - medication, device, service, protocol or other.) 406 */ 407 public EntryDefinition setType(CodeableConcept value) { 408 this.type = value; 409 return this; 410 } 411 412 /** 413 * @return {@link #purpose} (Whether the entry represents an orderable item, or other.) 414 */ 415 public CodeableConcept getPurpose() { 416 if (this.purpose == null) 417 if (Configuration.errorOnAutoCreate()) 418 throw new Error("Attempt to auto-create EntryDefinition.purpose"); 419 else if (Configuration.doAutoCreate()) 420 this.purpose = new CodeableConcept(); // cc 421 return this.purpose; 422 } 423 424 public boolean hasPurpose() { 425 return this.purpose != null && !this.purpose.isEmpty(); 426 } 427 428 /** 429 * @param value {@link #purpose} (Whether the entry represents an orderable item, or other.) 430 */ 431 public EntryDefinition setPurpose(CodeableConcept value) { 432 this.purpose = value; 433 return this; 434 } 435 436 /** 437 * @return {@link #referencedItem} (Content of the catalog.) 438 */ 439 public Reference getReferencedItem() { 440 if (this.referencedItem == null) 441 if (Configuration.errorOnAutoCreate()) 442 throw new Error("Attempt to auto-create EntryDefinition.referencedItem"); 443 else if (Configuration.doAutoCreate()) 444 this.referencedItem = new Reference(); // cc 445 return this.referencedItem; 446 } 447 448 public boolean hasReferencedItem() { 449 return this.referencedItem != null && !this.referencedItem.isEmpty(); 450 } 451 452 /** 453 * @param value {@link #referencedItem} (Content of the catalog.) 454 */ 455 public EntryDefinition setReferencedItem(Reference value) { 456 this.referencedItem = value; 457 return this; 458 } 459 460 /** 461 * @return {@link #referencedItem} 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. (Content of the catalog.) 462 */ 463 public Resource getReferencedItemTarget() { 464 return this.referencedItemTarget; 465 } 466 467 /** 468 * @param value {@link #referencedItem} 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. (Content of the catalog.) 469 */ 470 public EntryDefinition setReferencedItemTarget(Resource value) { 471 this.referencedItemTarget = value; 472 return this; 473 } 474 475 /** 476 * @return {@link #identifier} (Used in supporting different identifiers for the same product, e.g. manufacturer code and retailer code.) 477 */ 478 public Identifier getIdentifier() { 479 if (this.identifier == null) 480 if (Configuration.errorOnAutoCreate()) 481 throw new Error("Attempt to auto-create EntryDefinition.identifier"); 482 else if (Configuration.doAutoCreate()) 483 this.identifier = new Identifier(); // cc 484 return this.identifier; 485 } 486 487 public boolean hasIdentifier() { 488 return this.identifier != null && !this.identifier.isEmpty(); 489 } 490 491 /** 492 * @param value {@link #identifier} (Used in supporting different identifiers for the same product, e.g. manufacturer code and retailer code.) 493 */ 494 public EntryDefinition setIdentifier(Identifier value) { 495 this.identifier = value; 496 return this; 497 } 498 499 /** 500 * @return {@link #additionalIdentifier} (Used in supporting related concepts, e.g. NDC to RxNorm.) 501 */ 502 public List<Identifier> getAdditionalIdentifier() { 503 if (this.additionalIdentifier == null) 504 this.additionalIdentifier = new ArrayList<Identifier>(); 505 return this.additionalIdentifier; 506 } 507 508 /** 509 * @return Returns a reference to <code>this</code> for easy method chaining 510 */ 511 public EntryDefinition setAdditionalIdentifier(List<Identifier> theAdditionalIdentifier) { 512 this.additionalIdentifier = theAdditionalIdentifier; 513 return this; 514 } 515 516 public boolean hasAdditionalIdentifier() { 517 if (this.additionalIdentifier == null) 518 return false; 519 for (Identifier item : this.additionalIdentifier) 520 if (!item.isEmpty()) 521 return true; 522 return false; 523 } 524 525 public Identifier addAdditionalIdentifier() { //3 526 Identifier t = new Identifier(); 527 if (this.additionalIdentifier == null) 528 this.additionalIdentifier = new ArrayList<Identifier>(); 529 this.additionalIdentifier.add(t); 530 return t; 531 } 532 533 public EntryDefinition addAdditionalIdentifier(Identifier t) { //3 534 if (t == null) 535 return this; 536 if (this.additionalIdentifier == null) 537 this.additionalIdentifier = new ArrayList<Identifier>(); 538 this.additionalIdentifier.add(t); 539 return this; 540 } 541 542 /** 543 * @return The first repetition of repeating field {@link #additionalIdentifier}, creating it if it does not already exist 544 */ 545 public Identifier getAdditionalIdentifierFirstRep() { 546 if (getAdditionalIdentifier().isEmpty()) { 547 addAdditionalIdentifier(); 548 } 549 return getAdditionalIdentifier().get(0); 550 } 551 552 /** 553 * @return {@link #classification} (Classes of devices, or ATC for medication.) 554 */ 555 public List<CodeableConcept> getClassification() { 556 if (this.classification == null) 557 this.classification = new ArrayList<CodeableConcept>(); 558 return this.classification; 559 } 560 561 /** 562 * @return Returns a reference to <code>this</code> for easy method chaining 563 */ 564 public EntryDefinition setClassification(List<CodeableConcept> theClassification) { 565 this.classification = theClassification; 566 return this; 567 } 568 569 public boolean hasClassification() { 570 if (this.classification == null) 571 return false; 572 for (CodeableConcept item : this.classification) 573 if (!item.isEmpty()) 574 return true; 575 return false; 576 } 577 578 public CodeableConcept addClassification() { //3 579 CodeableConcept t = new CodeableConcept(); 580 if (this.classification == null) 581 this.classification = new ArrayList<CodeableConcept>(); 582 this.classification.add(t); 583 return t; 584 } 585 586 public EntryDefinition addClassification(CodeableConcept t) { //3 587 if (t == null) 588 return this; 589 if (this.classification == null) 590 this.classification = new ArrayList<CodeableConcept>(); 591 this.classification.add(t); 592 return this; 593 } 594 595 /** 596 * @return The first repetition of repeating field {@link #classification}, creating it if it does not already exist 597 */ 598 public CodeableConcept getClassificationFirstRep() { 599 if (getClassification().isEmpty()) { 600 addClassification(); 601 } 602 return getClassification().get(0); 603 } 604 605 /** 606 * @return {@link #status} (Used to support catalog exchange even for unsupported products, e.g. getting list of medications even if not prescribable.) 607 */ 608 public CodeableConcept getStatus() { 609 if (this.status == null) 610 if (Configuration.errorOnAutoCreate()) 611 throw new Error("Attempt to auto-create EntryDefinition.status"); 612 else if (Configuration.doAutoCreate()) 613 this.status = new CodeableConcept(); // cc 614 return this.status; 615 } 616 617 public boolean hasStatus() { 618 return this.status != null && !this.status.isEmpty(); 619 } 620 621 /** 622 * @param value {@link #status} (Used to support catalog exchange even for unsupported products, e.g. getting list of medications even if not prescribable.) 623 */ 624 public EntryDefinition setStatus(CodeableConcept value) { 625 this.status = value; 626 return this; 627 } 628 629 /** 630 * @return {@link #validityPeriod} (The time period in which this catalog entry is expected to be active.) 631 */ 632 public Period getValidityPeriod() { 633 if (this.validityPeriod == null) 634 if (Configuration.errorOnAutoCreate()) 635 throw new Error("Attempt to auto-create EntryDefinition.validityPeriod"); 636 else if (Configuration.doAutoCreate()) 637 this.validityPeriod = new Period(); // cc 638 return this.validityPeriod; 639 } 640 641 public boolean hasValidityPeriod() { 642 return this.validityPeriod != null && !this.validityPeriod.isEmpty(); 643 } 644 645 /** 646 * @param value {@link #validityPeriod} (The time period in which this catalog entry is expected to be active.) 647 */ 648 public EntryDefinition setValidityPeriod(Period value) { 649 this.validityPeriod = value; 650 return this; 651 } 652 653 /** 654 * @return {@link #lastUpdated} (Typically date of issue is different from the beginning of the validity. This can be used to see when an item was last updated.). This is the underlying object with id, value and extensions. The accessor "getLastUpdated" gives direct access to the value 655 */ 656 public DateTimeType getLastUpdatedElement() { 657 if (this.lastUpdated == null) 658 if (Configuration.errorOnAutoCreate()) 659 throw new Error("Attempt to auto-create EntryDefinition.lastUpdated"); 660 else if (Configuration.doAutoCreate()) 661 this.lastUpdated = new DateTimeType(); // bb 662 return this.lastUpdated; 663 } 664 665 public boolean hasLastUpdatedElement() { 666 return this.lastUpdated != null && !this.lastUpdated.isEmpty(); 667 } 668 669 public boolean hasLastUpdated() { 670 return this.lastUpdated != null && !this.lastUpdated.isEmpty(); 671 } 672 673 /** 674 * @param value {@link #lastUpdated} (Typically date of issue is different from the beginning of the validity. This can be used to see when an item was last updated.). This is the underlying object with id, value and extensions. The accessor "getLastUpdated" gives direct access to the value 675 */ 676 public EntryDefinition setLastUpdatedElement(DateTimeType value) { 677 this.lastUpdated = value; 678 return this; 679 } 680 681 /** 682 * @return Typically date of issue is different from the beginning of the validity. This can be used to see when an item was last updated. 683 */ 684 public Date getLastUpdated() { 685 return this.lastUpdated == null ? null : this.lastUpdated.getValue(); 686 } 687 688 /** 689 * @param value Typically date of issue is different from the beginning of the validity. This can be used to see when an item was last updated. 690 */ 691 public EntryDefinition setLastUpdated(Date value) { 692 if (value == null) 693 this.lastUpdated = null; 694 else { 695 if (this.lastUpdated == null) 696 this.lastUpdated = new DateTimeType(); 697 this.lastUpdated.setValue(value); 698 } 699 return this; 700 } 701 702 /** 703 * @return {@link #additionalCharacteristic} (Used for examplefor Out of Formulary, or any specifics.) 704 */ 705 public List<CodeableConcept> getAdditionalCharacteristic() { 706 if (this.additionalCharacteristic == null) 707 this.additionalCharacteristic = new ArrayList<CodeableConcept>(); 708 return this.additionalCharacteristic; 709 } 710 711 /** 712 * @return Returns a reference to <code>this</code> for easy method chaining 713 */ 714 public EntryDefinition setAdditionalCharacteristic(List<CodeableConcept> theAdditionalCharacteristic) { 715 this.additionalCharacteristic = theAdditionalCharacteristic; 716 return this; 717 } 718 719 public boolean hasAdditionalCharacteristic() { 720 if (this.additionalCharacteristic == null) 721 return false; 722 for (CodeableConcept item : this.additionalCharacteristic) 723 if (!item.isEmpty()) 724 return true; 725 return false; 726 } 727 728 public CodeableConcept addAdditionalCharacteristic() { //3 729 CodeableConcept t = new CodeableConcept(); 730 if (this.additionalCharacteristic == null) 731 this.additionalCharacteristic = new ArrayList<CodeableConcept>(); 732 this.additionalCharacteristic.add(t); 733 return t; 734 } 735 736 public EntryDefinition addAdditionalCharacteristic(CodeableConcept t) { //3 737 if (t == null) 738 return this; 739 if (this.additionalCharacteristic == null) 740 this.additionalCharacteristic = new ArrayList<CodeableConcept>(); 741 this.additionalCharacteristic.add(t); 742 return this; 743 } 744 745 /** 746 * @return The first repetition of repeating field {@link #additionalCharacteristic}, creating it if it does not already exist 747 */ 748 public CodeableConcept getAdditionalCharacteristicFirstRep() { 749 if (getAdditionalCharacteristic().isEmpty()) { 750 addAdditionalCharacteristic(); 751 } 752 return getAdditionalCharacteristic().get(0); 753 } 754 755 /** 756 * @return {@link #additionalClassification} (User for example for ATC classification, or.) 757 */ 758 public List<CodeableConcept> getAdditionalClassification() { 759 if (this.additionalClassification == null) 760 this.additionalClassification = new ArrayList<CodeableConcept>(); 761 return this.additionalClassification; 762 } 763 764 /** 765 * @return Returns a reference to <code>this</code> for easy method chaining 766 */ 767 public EntryDefinition setAdditionalClassification(List<CodeableConcept> theAdditionalClassification) { 768 this.additionalClassification = theAdditionalClassification; 769 return this; 770 } 771 772 public boolean hasAdditionalClassification() { 773 if (this.additionalClassification == null) 774 return false; 775 for (CodeableConcept item : this.additionalClassification) 776 if (!item.isEmpty()) 777 return true; 778 return false; 779 } 780 781 public CodeableConcept addAdditionalClassification() { //3 782 CodeableConcept t = new CodeableConcept(); 783 if (this.additionalClassification == null) 784 this.additionalClassification = new ArrayList<CodeableConcept>(); 785 this.additionalClassification.add(t); 786 return t; 787 } 788 789 public EntryDefinition addAdditionalClassification(CodeableConcept t) { //3 790 if (t == null) 791 return this; 792 if (this.additionalClassification == null) 793 this.additionalClassification = new ArrayList<CodeableConcept>(); 794 this.additionalClassification.add(t); 795 return this; 796 } 797 798 /** 799 * @return The first repetition of repeating field {@link #additionalClassification}, creating it if it does not already exist 800 */ 801 public CodeableConcept getAdditionalClassificationFirstRep() { 802 if (getAdditionalClassification().isEmpty()) { 803 addAdditionalClassification(); 804 } 805 return getAdditionalClassification().get(0); 806 } 807 808 /** 809 * @return {@link #relatedEntry} (Used for example, to point to a substance, or to a device used to administer a medication.) 810 */ 811 public List<EntryDefinitionRelatedEntryComponent> getRelatedEntry() { 812 if (this.relatedEntry == null) 813 this.relatedEntry = new ArrayList<EntryDefinitionRelatedEntryComponent>(); 814 return this.relatedEntry; 815 } 816 817 /** 818 * @return Returns a reference to <code>this</code> for easy method chaining 819 */ 820 public EntryDefinition setRelatedEntry(List<EntryDefinitionRelatedEntryComponent> theRelatedEntry) { 821 this.relatedEntry = theRelatedEntry; 822 return this; 823 } 824 825 public boolean hasRelatedEntry() { 826 if (this.relatedEntry == null) 827 return false; 828 for (EntryDefinitionRelatedEntryComponent item : this.relatedEntry) 829 if (!item.isEmpty()) 830 return true; 831 return false; 832 } 833 834 public EntryDefinitionRelatedEntryComponent addRelatedEntry() { //3 835 EntryDefinitionRelatedEntryComponent t = new EntryDefinitionRelatedEntryComponent(); 836 if (this.relatedEntry == null) 837 this.relatedEntry = new ArrayList<EntryDefinitionRelatedEntryComponent>(); 838 this.relatedEntry.add(t); 839 return t; 840 } 841 842 public EntryDefinition addRelatedEntry(EntryDefinitionRelatedEntryComponent t) { //3 843 if (t == null) 844 return this; 845 if (this.relatedEntry == null) 846 this.relatedEntry = new ArrayList<EntryDefinitionRelatedEntryComponent>(); 847 this.relatedEntry.add(t); 848 return this; 849 } 850 851 /** 852 * @return The first repetition of repeating field {@link #relatedEntry}, creating it if it does not already exist 853 */ 854 public EntryDefinitionRelatedEntryComponent getRelatedEntryFirstRep() { 855 if (getRelatedEntry().isEmpty()) { 856 addRelatedEntry(); 857 } 858 return getRelatedEntry().get(0); 859 } 860 861 protected void listChildren(List<Property> children) { 862 super.listChildren(children); 863 children.add(new Property("type", "CodeableConcept", "The type of item - medication, device, service, protocol or other.", 0, 1, type)); 864 children.add(new Property("purpose", "CodeableConcept", "Whether the entry represents an orderable item, or other.", 0, 1, purpose)); 865 children.add(new Property("referencedItem", "Reference(Medication|Device|Organization|Practitioner|HealthcareService|ActivityDefinition|PlanDefinition|SpecimenDefinition|ObservationDefinition|Binary)", "Content of the catalog.", 0, 1, referencedItem)); 866 children.add(new Property("identifier", "Identifier", "Used in supporting different identifiers for the same product, e.g. manufacturer code and retailer code.", 0, 1, identifier)); 867 children.add(new Property("additionalIdentifier", "Identifier", "Used in supporting related concepts, e.g. NDC to RxNorm.", 0, java.lang.Integer.MAX_VALUE, additionalIdentifier)); 868 children.add(new Property("classification", "CodeableConcept", "Classes of devices, or ATC for medication.", 0, java.lang.Integer.MAX_VALUE, classification)); 869 children.add(new Property("status", "CodeableConcept", "Used to support catalog exchange even for unsupported products, e.g. getting list of medications even if not prescribable.", 0, 1, status)); 870 children.add(new Property("validityPeriod", "Period", "The time period in which this catalog entry is expected to be active.", 0, 1, validityPeriod)); 871 children.add(new Property("lastUpdated", "dateTime", "Typically date of issue is different from the beginning of the validity. This can be used to see when an item was last updated.", 0, 1, lastUpdated)); 872 children.add(new Property("additionalCharacteristic", "CodeableConcept", "Used for examplefor Out of Formulary, or any specifics.", 0, java.lang.Integer.MAX_VALUE, additionalCharacteristic)); 873 children.add(new Property("additionalClassification", "CodeableConcept", "User for example for ATC classification, or.", 0, java.lang.Integer.MAX_VALUE, additionalClassification)); 874 children.add(new Property("relatedEntry", "", "Used for example, to point to a substance, or to a device used to administer a medication.", 0, java.lang.Integer.MAX_VALUE, relatedEntry)); 875 } 876 877 @Override 878 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 879 switch (_hash) { 880 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The type of item - medication, device, service, protocol or other.", 0, 1, type); 881 case -220463842: /*purpose*/ return new Property("purpose", "CodeableConcept", "Whether the entry represents an orderable item, or other.", 0, 1, purpose); 882 case -1896630996: /*referencedItem*/ return new Property("referencedItem", "Reference(Medication|Device|Organization|Practitioner|HealthcareService|ActivityDefinition|PlanDefinition|SpecimenDefinition|ObservationDefinition|Binary)", "Content of the catalog.", 0, 1, referencedItem); 883 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Used in supporting different identifiers for the same product, e.g. manufacturer code and retailer code.", 0, 1, identifier); 884 case 1195162672: /*additionalIdentifier*/ return new Property("additionalIdentifier", "Identifier", "Used in supporting related concepts, e.g. NDC to RxNorm.", 0, java.lang.Integer.MAX_VALUE, additionalIdentifier); 885 case 382350310: /*classification*/ return new Property("classification", "CodeableConcept", "Classes of devices, or ATC for medication.", 0, java.lang.Integer.MAX_VALUE, classification); 886 case -892481550: /*status*/ return new Property("status", "CodeableConcept", "Used to support catalog exchange even for unsupported products, e.g. getting list of medications even if not prescribable.", 0, 1, status); 887 case -1434195053: /*validityPeriod*/ return new Property("validityPeriod", "Period", "The time period in which this catalog entry is expected to be active.", 0, 1, validityPeriod); 888 case 1649733957: /*lastUpdated*/ return new Property("lastUpdated", "dateTime", "Typically date of issue is different from the beginning of the validity. This can be used to see when an item was last updated.", 0, 1, lastUpdated); 889 case -1638369886: /*additionalCharacteristic*/ return new Property("additionalCharacteristic", "CodeableConcept", "Used for examplefor Out of Formulary, or any specifics.", 0, java.lang.Integer.MAX_VALUE, additionalCharacteristic); 890 case -1622333459: /*additionalClassification*/ return new Property("additionalClassification", "CodeableConcept", "User for example for ATC classification, or.", 0, java.lang.Integer.MAX_VALUE, additionalClassification); 891 case 130178823: /*relatedEntry*/ return new Property("relatedEntry", "", "Used for example, to point to a substance, or to a device used to administer a medication.", 0, java.lang.Integer.MAX_VALUE, relatedEntry); 892 default: return super.getNamedProperty(_hash, _name, _checkValid); 893 } 894 895 } 896 897 @Override 898 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 899 switch (hash) { 900 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 901 case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // CodeableConcept 902 case -1896630996: /*referencedItem*/ return this.referencedItem == null ? new Base[0] : new Base[] {this.referencedItem}; // Reference 903 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 904 case 1195162672: /*additionalIdentifier*/ return this.additionalIdentifier == null ? new Base[0] : this.additionalIdentifier.toArray(new Base[this.additionalIdentifier.size()]); // Identifier 905 case 382350310: /*classification*/ return this.classification == null ? new Base[0] : this.classification.toArray(new Base[this.classification.size()]); // CodeableConcept 906 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // CodeableConcept 907 case -1434195053: /*validityPeriod*/ return this.validityPeriod == null ? new Base[0] : new Base[] {this.validityPeriod}; // Period 908 case 1649733957: /*lastUpdated*/ return this.lastUpdated == null ? new Base[0] : new Base[] {this.lastUpdated}; // DateTimeType 909 case -1638369886: /*additionalCharacteristic*/ return this.additionalCharacteristic == null ? new Base[0] : this.additionalCharacteristic.toArray(new Base[this.additionalCharacteristic.size()]); // CodeableConcept 910 case -1622333459: /*additionalClassification*/ return this.additionalClassification == null ? new Base[0] : this.additionalClassification.toArray(new Base[this.additionalClassification.size()]); // CodeableConcept 911 case 130178823: /*relatedEntry*/ return this.relatedEntry == null ? new Base[0] : this.relatedEntry.toArray(new Base[this.relatedEntry.size()]); // EntryDefinitionRelatedEntryComponent 912 default: return super.getProperty(hash, name, checkValid); 913 } 914 915 } 916 917 @Override 918 public Base setProperty(int hash, String name, Base value) throws FHIRException { 919 switch (hash) { 920 case 3575610: // type 921 this.type = castToCodeableConcept(value); // CodeableConcept 922 return value; 923 case -220463842: // purpose 924 this.purpose = castToCodeableConcept(value); // CodeableConcept 925 return value; 926 case -1896630996: // referencedItem 927 this.referencedItem = castToReference(value); // Reference 928 return value; 929 case -1618432855: // identifier 930 this.identifier = castToIdentifier(value); // Identifier 931 return value; 932 case 1195162672: // additionalIdentifier 933 this.getAdditionalIdentifier().add(castToIdentifier(value)); // Identifier 934 return value; 935 case 382350310: // classification 936 this.getClassification().add(castToCodeableConcept(value)); // CodeableConcept 937 return value; 938 case -892481550: // status 939 this.status = castToCodeableConcept(value); // CodeableConcept 940 return value; 941 case -1434195053: // validityPeriod 942 this.validityPeriod = castToPeriod(value); // Period 943 return value; 944 case 1649733957: // lastUpdated 945 this.lastUpdated = castToDateTime(value); // DateTimeType 946 return value; 947 case -1638369886: // additionalCharacteristic 948 this.getAdditionalCharacteristic().add(castToCodeableConcept(value)); // CodeableConcept 949 return value; 950 case -1622333459: // additionalClassification 951 this.getAdditionalClassification().add(castToCodeableConcept(value)); // CodeableConcept 952 return value; 953 case 130178823: // relatedEntry 954 this.getRelatedEntry().add((EntryDefinitionRelatedEntryComponent) value); // EntryDefinitionRelatedEntryComponent 955 return value; 956 default: return super.setProperty(hash, name, value); 957 } 958 959 } 960 961 @Override 962 public Base setProperty(String name, Base value) throws FHIRException { 963 if (name.equals("type")) { 964 this.type = castToCodeableConcept(value); // CodeableConcept 965 } else if (name.equals("purpose")) { 966 this.purpose = castToCodeableConcept(value); // CodeableConcept 967 } else if (name.equals("referencedItem")) { 968 this.referencedItem = castToReference(value); // Reference 969 } else if (name.equals("identifier")) { 970 this.identifier = castToIdentifier(value); // Identifier 971 } else if (name.equals("additionalIdentifier")) { 972 this.getAdditionalIdentifier().add(castToIdentifier(value)); 973 } else if (name.equals("classification")) { 974 this.getClassification().add(castToCodeableConcept(value)); 975 } else if (name.equals("status")) { 976 this.status = castToCodeableConcept(value); // CodeableConcept 977 } else if (name.equals("validityPeriod")) { 978 this.validityPeriod = castToPeriod(value); // Period 979 } else if (name.equals("lastUpdated")) { 980 this.lastUpdated = castToDateTime(value); // DateTimeType 981 } else if (name.equals("additionalCharacteristic")) { 982 this.getAdditionalCharacteristic().add(castToCodeableConcept(value)); 983 } else if (name.equals("additionalClassification")) { 984 this.getAdditionalClassification().add(castToCodeableConcept(value)); 985 } else if (name.equals("relatedEntry")) { 986 this.getRelatedEntry().add((EntryDefinitionRelatedEntryComponent) value); 987 } else 988 return super.setProperty(name, value); 989 return value; 990 } 991 992 @Override 993 public Base makeProperty(int hash, String name) throws FHIRException { 994 switch (hash) { 995 case 3575610: return getType(); 996 case -220463842: return getPurpose(); 997 case -1896630996: return getReferencedItem(); 998 case -1618432855: return getIdentifier(); 999 case 1195162672: return addAdditionalIdentifier(); 1000 case 382350310: return addClassification(); 1001 case -892481550: return getStatus(); 1002 case -1434195053: return getValidityPeriod(); 1003 case 1649733957: return getLastUpdatedElement(); 1004 case -1638369886: return addAdditionalCharacteristic(); 1005 case -1622333459: return addAdditionalClassification(); 1006 case 130178823: return addRelatedEntry(); 1007 default: return super.makeProperty(hash, name); 1008 } 1009 1010 } 1011 1012 @Override 1013 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1014 switch (hash) { 1015 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 1016 case -220463842: /*purpose*/ return new String[] {"CodeableConcept"}; 1017 case -1896630996: /*referencedItem*/ return new String[] {"Reference"}; 1018 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1019 case 1195162672: /*additionalIdentifier*/ return new String[] {"Identifier"}; 1020 case 382350310: /*classification*/ return new String[] {"CodeableConcept"}; 1021 case -892481550: /*status*/ return new String[] {"CodeableConcept"}; 1022 case -1434195053: /*validityPeriod*/ return new String[] {"Period"}; 1023 case 1649733957: /*lastUpdated*/ return new String[] {"dateTime"}; 1024 case -1638369886: /*additionalCharacteristic*/ return new String[] {"CodeableConcept"}; 1025 case -1622333459: /*additionalClassification*/ return new String[] {"CodeableConcept"}; 1026 case 130178823: /*relatedEntry*/ return new String[] {}; 1027 default: return super.getTypesForProperty(hash, name); 1028 } 1029 1030 } 1031 1032 @Override 1033 public Base addChild(String name) throws FHIRException { 1034 if (name.equals("type")) { 1035 this.type = new CodeableConcept(); 1036 return this.type; 1037 } 1038 else if (name.equals("purpose")) { 1039 this.purpose = new CodeableConcept(); 1040 return this.purpose; 1041 } 1042 else if (name.equals("referencedItem")) { 1043 this.referencedItem = new Reference(); 1044 return this.referencedItem; 1045 } 1046 else if (name.equals("identifier")) { 1047 this.identifier = new Identifier(); 1048 return this.identifier; 1049 } 1050 else if (name.equals("additionalIdentifier")) { 1051 return addAdditionalIdentifier(); 1052 } 1053 else if (name.equals("classification")) { 1054 return addClassification(); 1055 } 1056 else if (name.equals("status")) { 1057 this.status = new CodeableConcept(); 1058 return this.status; 1059 } 1060 else if (name.equals("validityPeriod")) { 1061 this.validityPeriod = new Period(); 1062 return this.validityPeriod; 1063 } 1064 else if (name.equals("lastUpdated")) { 1065 throw new FHIRException("Cannot call addChild on a primitive type EntryDefinition.lastUpdated"); 1066 } 1067 else if (name.equals("additionalCharacteristic")) { 1068 return addAdditionalCharacteristic(); 1069 } 1070 else if (name.equals("additionalClassification")) { 1071 return addAdditionalClassification(); 1072 } 1073 else if (name.equals("relatedEntry")) { 1074 return addRelatedEntry(); 1075 } 1076 else 1077 return super.addChild(name); 1078 } 1079 1080 public String fhirType() { 1081 return "EntryDefinition"; 1082 1083 } 1084 1085 public EntryDefinition copy() { 1086 EntryDefinition dst = new EntryDefinition(); 1087 copyValues(dst); 1088 dst.type = type == null ? null : type.copy(); 1089 dst.purpose = purpose == null ? null : purpose.copy(); 1090 dst.referencedItem = referencedItem == null ? null : referencedItem.copy(); 1091 dst.identifier = identifier == null ? null : identifier.copy(); 1092 if (additionalIdentifier != null) { 1093 dst.additionalIdentifier = new ArrayList<Identifier>(); 1094 for (Identifier i : additionalIdentifier) 1095 dst.additionalIdentifier.add(i.copy()); 1096 }; 1097 if (classification != null) { 1098 dst.classification = new ArrayList<CodeableConcept>(); 1099 for (CodeableConcept i : classification) 1100 dst.classification.add(i.copy()); 1101 }; 1102 dst.status = status == null ? null : status.copy(); 1103 dst.validityPeriod = validityPeriod == null ? null : validityPeriod.copy(); 1104 dst.lastUpdated = lastUpdated == null ? null : lastUpdated.copy(); 1105 if (additionalCharacteristic != null) { 1106 dst.additionalCharacteristic = new ArrayList<CodeableConcept>(); 1107 for (CodeableConcept i : additionalCharacteristic) 1108 dst.additionalCharacteristic.add(i.copy()); 1109 }; 1110 if (additionalClassification != null) { 1111 dst.additionalClassification = new ArrayList<CodeableConcept>(); 1112 for (CodeableConcept i : additionalClassification) 1113 dst.additionalClassification.add(i.copy()); 1114 }; 1115 if (relatedEntry != null) { 1116 dst.relatedEntry = new ArrayList<EntryDefinitionRelatedEntryComponent>(); 1117 for (EntryDefinitionRelatedEntryComponent i : relatedEntry) 1118 dst.relatedEntry.add(i.copy()); 1119 }; 1120 return dst; 1121 } 1122 1123 protected EntryDefinition typedCopy() { 1124 return copy(); 1125 } 1126 1127 @Override 1128 public boolean equalsDeep(Base other_) { 1129 if (!super.equalsDeep(other_)) 1130 return false; 1131 if (!(other_ instanceof EntryDefinition)) 1132 return false; 1133 EntryDefinition o = (EntryDefinition) other_; 1134 return compareDeep(type, o.type, true) && compareDeep(purpose, o.purpose, true) && compareDeep(referencedItem, o.referencedItem, true) 1135 && compareDeep(identifier, o.identifier, true) && compareDeep(additionalIdentifier, o.additionalIdentifier, true) 1136 && compareDeep(classification, o.classification, true) && compareDeep(status, o.status, true) && compareDeep(validityPeriod, o.validityPeriod, true) 1137 && compareDeep(lastUpdated, o.lastUpdated, true) && compareDeep(additionalCharacteristic, o.additionalCharacteristic, true) 1138 && compareDeep(additionalClassification, o.additionalClassification, true) && compareDeep(relatedEntry, o.relatedEntry, true) 1139 ; 1140 } 1141 1142 @Override 1143 public boolean equalsShallow(Base other_) { 1144 if (!super.equalsShallow(other_)) 1145 return false; 1146 if (!(other_ instanceof EntryDefinition)) 1147 return false; 1148 EntryDefinition o = (EntryDefinition) other_; 1149 return compareValues(lastUpdated, o.lastUpdated, true); 1150 } 1151 1152 public boolean isEmpty() { 1153 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, purpose, referencedItem 1154 , identifier, additionalIdentifier, classification, status, validityPeriod, lastUpdated 1155 , additionalCharacteristic, additionalClassification, relatedEntry); 1156 } 1157 1158 @Override 1159 public ResourceType getResourceType() { 1160 return ResourceType.EntryDefinition; 1161 } 1162 1163 1164} 1165