001package org.hl7.fhir.dstu3.model; 002 003 004 005/* 006 Copyright (c) 2011+, HL7, Inc. 007 All rights reserved. 008 009 Redistribution and use in source and binary forms, with or without modification, 010 are permitted provided that the following conditions are met: 011 012 * Redistributions of source code must retain the above copyright notice, this 013 list of conditions and the following disclaimer. 014 * Redistributions in binary form must reproduce the above copyright notice, 015 this list of conditions and the following disclaimer in the documentation 016 and/or other materials provided with the distribution. 017 * Neither the name of HL7 nor the names of its contributors may be used to 018 endorse or promote products derived from this software without specific 019 prior written permission. 020 021 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 022 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 023 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 024 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 025 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 026 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 027 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 028 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 029 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 030 POSSIBILITY OF SUCH DAMAGE. 031 032*/ 033 034// Generated on Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.x 035import java.util.List; 036 037import org.hl7.fhir.exceptions.FHIRException; 038import org.hl7.fhir.instance.model.api.ICompositeType; 039import org.hl7.fhir.utilities.Utilities; 040 041import ca.uhn.fhir.model.api.annotation.Child; 042import ca.uhn.fhir.model.api.annotation.DatatypeDef; 043import ca.uhn.fhir.model.api.annotation.Description; 044/** 045 * A technical identifier - identifies some entity uniquely and unambiguously. 046 */ 047@DatatypeDef(name="Identifier") 048public class Identifier extends Type implements ICompositeType { 049 050 public enum IdentifierUse { 051 /** 052 * The identifier recommended for display and use in real-world interactions. 053 */ 054 USUAL, 055 /** 056 * The identifier considered to be most trusted for the identification of this item. 057 */ 058 OFFICIAL, 059 /** 060 * A temporary identifier. 061 */ 062 TEMP, 063 /** 064 * An identifier that was assigned in secondary use - it serves to identify the object in a relative context, but cannot be consistently assigned to the same object again in a different context. 065 */ 066 SECONDARY, 067 /** 068 * added to help the parsers with the generic types 069 */ 070 NULL; 071 public static IdentifierUse fromCode(String codeString) throws FHIRException { 072 if (codeString == null || "".equals(codeString)) 073 return null; 074 if ("usual".equals(codeString)) 075 return USUAL; 076 if ("official".equals(codeString)) 077 return OFFICIAL; 078 if ("temp".equals(codeString)) 079 return TEMP; 080 if ("secondary".equals(codeString)) 081 return SECONDARY; 082 if (Configuration.isAcceptInvalidEnums()) 083 return null; 084 else 085 throw new FHIRException("Unknown IdentifierUse code '"+codeString+"'"); 086 } 087 public String toCode() { 088 switch (this) { 089 case USUAL: return "usual"; 090 case OFFICIAL: return "official"; 091 case TEMP: return "temp"; 092 case SECONDARY: return "secondary"; 093 case NULL: return null; 094 default: return "?"; 095 } 096 } 097 public String getSystem() { 098 switch (this) { 099 case USUAL: return "http://hl7.org/fhir/identifier-use"; 100 case OFFICIAL: return "http://hl7.org/fhir/identifier-use"; 101 case TEMP: return "http://hl7.org/fhir/identifier-use"; 102 case SECONDARY: return "http://hl7.org/fhir/identifier-use"; 103 case NULL: return null; 104 default: return "?"; 105 } 106 } 107 public String getDefinition() { 108 switch (this) { 109 case USUAL: return "The identifier recommended for display and use in real-world interactions."; 110 case OFFICIAL: return "The identifier considered to be most trusted for the identification of this item."; 111 case TEMP: return "A temporary identifier."; 112 case SECONDARY: return "An identifier that was assigned in secondary use - it serves to identify the object in a relative context, but cannot be consistently assigned to the same object again in a different context."; 113 case NULL: return null; 114 default: return "?"; 115 } 116 } 117 public String getDisplay() { 118 switch (this) { 119 case USUAL: return "Usual"; 120 case OFFICIAL: return "Official"; 121 case TEMP: return "Temp"; 122 case SECONDARY: return "Secondary"; 123 case NULL: return null; 124 default: return "?"; 125 } 126 } 127 } 128 129 public static class IdentifierUseEnumFactory implements EnumFactory<IdentifierUse> { 130 public IdentifierUse fromCode(String codeString) throws IllegalArgumentException { 131 if (codeString == null || "".equals(codeString)) 132 if (codeString == null || "".equals(codeString) || "?".equals(codeString)) 133 return null; 134 if ("usual".equals(codeString)) 135 return IdentifierUse.USUAL; 136 if ("official".equals(codeString)) 137 return IdentifierUse.OFFICIAL; 138 if ("temp".equals(codeString)) 139 return IdentifierUse.TEMP; 140 if ("secondary".equals(codeString)) 141 return IdentifierUse.SECONDARY; 142 throw new IllegalArgumentException("Unknown IdentifierUse code '"+codeString+"'"); 143 } 144 public Enumeration<IdentifierUse> fromType(PrimitiveType<?> code) throws FHIRException { 145 if (code == null) 146 return null; 147 if (code.isEmpty()) 148 return new Enumeration<IdentifierUse>(this); 149 String codeString = code.asStringValue(); 150 if (codeString == null || "".equals(codeString)) 151 return null; 152 if ("usual".equals(codeString)) 153 return new Enumeration<IdentifierUse>(this, IdentifierUse.USUAL); 154 if ("official".equals(codeString)) 155 return new Enumeration<IdentifierUse>(this, IdentifierUse.OFFICIAL); 156 if ("temp".equals(codeString)) 157 return new Enumeration<IdentifierUse>(this, IdentifierUse.TEMP); 158 if ("secondary".equals(codeString)) 159 return new Enumeration<IdentifierUse>(this, IdentifierUse.SECONDARY); 160 throw new FHIRException("Unknown IdentifierUse code '"+codeString+"'"); 161 } 162 public String toCode(IdentifierUse code) { 163 if (code == IdentifierUse.USUAL) 164 return "usual"; 165 if (code == IdentifierUse.OFFICIAL) 166 return "official"; 167 if (code == IdentifierUse.TEMP) 168 return "temp"; 169 if (code == IdentifierUse.SECONDARY) 170 return "secondary"; 171 return "?"; 172 } 173 public String toSystem(IdentifierUse code) { 174 return code.getSystem(); 175 } 176 } 177 178 /** 179 * The purpose of this identifier. 180 */ 181 @Child(name = "use", type = {CodeType.class}, order=0, min=0, max=1, modifier=true, summary=true) 182 @Description(shortDefinition="usual | official | temp | secondary (If known)", formalDefinition="The purpose of this identifier." ) 183 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/identifier-use") 184 protected Enumeration<IdentifierUse> use; 185 186 /** 187 * A coded type for the identifier that can be used to determine which identifier to use for a specific purpose. 188 */ 189 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) 190 @Description(shortDefinition="Description of identifier", formalDefinition="A coded type for the identifier that can be used to determine which identifier to use for a specific purpose." ) 191 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/identifier-type") 192 protected CodeableConcept type; 193 194 /** 195 * Establishes the namespace for the value - that is, a URL that describes a set values that are unique. 196 */ 197 @Child(name = "system", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=true) 198 @Description(shortDefinition="The namespace for the identifier value", formalDefinition="Establishes the namespace for the value - that is, a URL that describes a set values that are unique." ) 199 protected UriType system; 200 201 /** 202 * The portion of the identifier typically relevant to the user and which is unique within the context of the system. 203 */ 204 @Child(name = "value", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) 205 @Description(shortDefinition="The value that is unique", formalDefinition="The portion of the identifier typically relevant to the user and which is unique within the context of the system." ) 206 protected StringType value; 207 208 /** 209 * Time period during which identifier is/was valid for use. 210 */ 211 @Child(name = "period", type = {Period.class}, order=4, min=0, max=1, modifier=false, summary=true) 212 @Description(shortDefinition="Time period when id is/was valid for use", formalDefinition="Time period during which identifier is/was valid for use." ) 213 protected Period period; 214 215 /** 216 * Organization that issued/manages the identifier. 217 */ 218 @Child(name = "assigner", type = {Organization.class}, order=5, min=0, max=1, modifier=false, summary=true) 219 @Description(shortDefinition="Organization that issued id (may be just text)", formalDefinition="Organization that issued/manages the identifier." ) 220 protected Reference assigner; 221 222 /** 223 * The actual object that is the target of the reference (Organization that issued/manages the identifier.) 224 */ 225 protected Organization assignerTarget; 226 227 private static final long serialVersionUID = -478840981L; 228 229 /** 230 * Constructor 231 */ 232 public Identifier() { 233 super(); 234 } 235 236 /** 237 * @return {@link #use} (The purpose of this identifier.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value 238 */ 239 public Enumeration<IdentifierUse> getUseElement() { 240 if (this.use == null) 241 if (Configuration.errorOnAutoCreate()) 242 throw new Error("Attempt to auto-create Identifier.use"); 243 else if (Configuration.doAutoCreate()) 244 this.use = new Enumeration<IdentifierUse>(new IdentifierUseEnumFactory()); // bb 245 return this.use; 246 } 247 248 public boolean hasUseElement() { 249 return this.use != null && !this.use.isEmpty(); 250 } 251 252 public boolean hasUse() { 253 return this.use != null && !this.use.isEmpty(); 254 } 255 256 /** 257 * @param value {@link #use} (The purpose of this identifier.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value 258 */ 259 public Identifier setUseElement(Enumeration<IdentifierUse> value) { 260 this.use = value; 261 return this; 262 } 263 264 /** 265 * @return The purpose of this identifier. 266 */ 267 public IdentifierUse getUse() { 268 return this.use == null ? null : this.use.getValue(); 269 } 270 271 /** 272 * @param value The purpose of this identifier. 273 */ 274 public Identifier setUse(IdentifierUse value) { 275 if (value == null) 276 this.use = null; 277 else { 278 if (this.use == null) 279 this.use = new Enumeration<IdentifierUse>(new IdentifierUseEnumFactory()); 280 this.use.setValue(value); 281 } 282 return this; 283 } 284 285 /** 286 * @return {@link #type} (A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.) 287 */ 288 public CodeableConcept getType() { 289 if (this.type == null) 290 if (Configuration.errorOnAutoCreate()) 291 throw new Error("Attempt to auto-create Identifier.type"); 292 else if (Configuration.doAutoCreate()) 293 this.type = new CodeableConcept(); // cc 294 return this.type; 295 } 296 297 public boolean hasType() { 298 return this.type != null && !this.type.isEmpty(); 299 } 300 301 /** 302 * @param value {@link #type} (A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.) 303 */ 304 public Identifier setType(CodeableConcept value) { 305 this.type = value; 306 return this; 307 } 308 309 /** 310 * @return {@link #system} (Establishes the namespace for the value - that is, a URL that describes a set values that are unique.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value 311 */ 312 public UriType getSystemElement() { 313 if (this.system == null) 314 if (Configuration.errorOnAutoCreate()) 315 throw new Error("Attempt to auto-create Identifier.system"); 316 else if (Configuration.doAutoCreate()) 317 this.system = new UriType(); // bb 318 return this.system; 319 } 320 321 public boolean hasSystemElement() { 322 return this.system != null && !this.system.isEmpty(); 323 } 324 325 public boolean hasSystem() { 326 return this.system != null && !this.system.isEmpty(); 327 } 328 329 /** 330 * @param value {@link #system} (Establishes the namespace for the value - that is, a URL that describes a set values that are unique.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value 331 */ 332 public Identifier setSystemElement(UriType value) { 333 this.system = value; 334 return this; 335 } 336 337 /** 338 * @return Establishes the namespace for the value - that is, a URL that describes a set values that are unique. 339 */ 340 public String getSystem() { 341 return this.system == null ? null : this.system.getValue(); 342 } 343 344 /** 345 * @param value Establishes the namespace for the value - that is, a URL that describes a set values that are unique. 346 */ 347 public Identifier setSystem(String value) { 348 if (Utilities.noString(value)) 349 this.system = null; 350 else { 351 if (this.system == null) 352 this.system = new UriType(); 353 this.system.setValue(value); 354 } 355 return this; 356 } 357 358 /** 359 * @return {@link #value} (The portion of the identifier typically relevant to the user and which is unique within the context of the system.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 360 */ 361 public StringType getValueElement() { 362 if (this.value == null) 363 if (Configuration.errorOnAutoCreate()) 364 throw new Error("Attempt to auto-create Identifier.value"); 365 else if (Configuration.doAutoCreate()) 366 this.value = new StringType(); // bb 367 return this.value; 368 } 369 370 public boolean hasValueElement() { 371 return this.value != null && !this.value.isEmpty(); 372 } 373 374 public boolean hasValue() { 375 return this.value != null && !this.value.isEmpty(); 376 } 377 378 /** 379 * @param value {@link #value} (The portion of the identifier typically relevant to the user and which is unique within the context of the system.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 380 */ 381 public Identifier setValueElement(StringType value) { 382 this.value = value; 383 return this; 384 } 385 386 /** 387 * @return The portion of the identifier typically relevant to the user and which is unique within the context of the system. 388 */ 389 public String getValue() { 390 return this.value == null ? null : this.value.getValue(); 391 } 392 393 /** 394 * @param value The portion of the identifier typically relevant to the user and which is unique within the context of the system. 395 */ 396 public Identifier setValue(String value) { 397 if (Utilities.noString(value)) 398 this.value = null; 399 else { 400 if (this.value == null) 401 this.value = new StringType(); 402 this.value.setValue(value); 403 } 404 return this; 405 } 406 407 /** 408 * @return {@link #period} (Time period during which identifier is/was valid for use.) 409 */ 410 public Period getPeriod() { 411 if (this.period == null) 412 if (Configuration.errorOnAutoCreate()) 413 throw new Error("Attempt to auto-create Identifier.period"); 414 else if (Configuration.doAutoCreate()) 415 this.period = new Period(); // cc 416 return this.period; 417 } 418 419 public boolean hasPeriod() { 420 return this.period != null && !this.period.isEmpty(); 421 } 422 423 /** 424 * @param value {@link #period} (Time period during which identifier is/was valid for use.) 425 */ 426 public Identifier setPeriod(Period value) { 427 this.period = value; 428 return this; 429 } 430 431 /** 432 * @return {@link #assigner} (Organization that issued/manages the identifier.) 433 */ 434 public Reference getAssigner() { 435 if (this.assigner == null) 436 if (Configuration.errorOnAutoCreate()) 437 throw new Error("Attempt to auto-create Identifier.assigner"); 438 else if (Configuration.doAutoCreate()) 439 this.assigner = new Reference(); // cc 440 return this.assigner; 441 } 442 443 public boolean hasAssigner() { 444 return this.assigner != null && !this.assigner.isEmpty(); 445 } 446 447 /** 448 * @param value {@link #assigner} (Organization that issued/manages the identifier.) 449 */ 450 public Identifier setAssigner(Reference value) { 451 this.assigner = value; 452 return this; 453 } 454 455 /** 456 * @return {@link #assigner} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Organization that issued/manages the identifier.) 457 */ 458 public Organization getAssignerTarget() { 459 if (this.assignerTarget == null) 460 if (Configuration.errorOnAutoCreate()) 461 throw new Error("Attempt to auto-create Identifier.assigner"); 462 else if (Configuration.doAutoCreate()) 463 this.assignerTarget = new Organization(); // aa 464 return this.assignerTarget; 465 } 466 467 /** 468 * @param value {@link #assigner} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Organization that issued/manages the identifier.) 469 */ 470 public Identifier setAssignerTarget(Organization value) { 471 this.assignerTarget = value; 472 return this; 473 } 474 475 protected void listChildren(List<Property> children) { 476 super.listChildren(children); 477 children.add(new Property("use", "code", "The purpose of this identifier.", 0, 1, use)); 478 children.add(new Property("type", "CodeableConcept", "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.", 0, 1, type)); 479 children.add(new Property("system", "uri", "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.", 0, 1, system)); 480 children.add(new Property("value", "string", "The portion of the identifier typically relevant to the user and which is unique within the context of the system.", 0, 1, value)); 481 children.add(new Property("period", "Period", "Time period during which identifier is/was valid for use.", 0, 1, period)); 482 children.add(new Property("assigner", "Reference(Organization)", "Organization that issued/manages the identifier.", 0, 1, assigner)); 483 } 484 485 @Override 486 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 487 switch (_hash) { 488 case 116103: /*use*/ return new Property("use", "code", "The purpose of this identifier.", 0, 1, use); 489 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.", 0, 1, type); 490 case -887328209: /*system*/ return new Property("system", "uri", "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.", 0, 1, system); 491 case 111972721: /*value*/ return new Property("value", "string", "The portion of the identifier typically relevant to the user and which is unique within the context of the system.", 0, 1, value); 492 case -991726143: /*period*/ return new Property("period", "Period", "Time period during which identifier is/was valid for use.", 0, 1, period); 493 case -369881636: /*assigner*/ return new Property("assigner", "Reference(Organization)", "Organization that issued/manages the identifier.", 0, 1, assigner); 494 default: return super.getNamedProperty(_hash, _name, _checkValid); 495 } 496 497 } 498 499 @Override 500 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 501 switch (hash) { 502 case 116103: /*use*/ return this.use == null ? new Base[0] : new Base[] {this.use}; // Enumeration<IdentifierUse> 503 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 504 case -887328209: /*system*/ return this.system == null ? new Base[0] : new Base[] {this.system}; // UriType 505 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 506 case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period 507 case -369881636: /*assigner*/ return this.assigner == null ? new Base[0] : new Base[] {this.assigner}; // Reference 508 default: return super.getProperty(hash, name, checkValid); 509 } 510 511 } 512 513 @Override 514 public Base setProperty(int hash, String name, Base value) throws FHIRException { 515 switch (hash) { 516 case 116103: // use 517 value = new IdentifierUseEnumFactory().fromType(castToCode(value)); 518 this.use = (Enumeration) value; // Enumeration<IdentifierUse> 519 return value; 520 case 3575610: // type 521 this.type = castToCodeableConcept(value); // CodeableConcept 522 return value; 523 case -887328209: // system 524 this.system = castToUri(value); // UriType 525 return value; 526 case 111972721: // value 527 this.value = castToString(value); // StringType 528 return value; 529 case -991726143: // period 530 this.period = castToPeriod(value); // Period 531 return value; 532 case -369881636: // assigner 533 this.assigner = castToReference(value); // Reference 534 return value; 535 default: return super.setProperty(hash, name, value); 536 } 537 538 } 539 540 @Override 541 public Base setProperty(String name, Base value) throws FHIRException { 542 if (name.equals("use")) { 543 value = new IdentifierUseEnumFactory().fromType(castToCode(value)); 544 this.use = (Enumeration) value; // Enumeration<IdentifierUse> 545 } else if (name.equals("type")) { 546 this.type = castToCodeableConcept(value); // CodeableConcept 547 } else if (name.equals("system")) { 548 this.system = castToUri(value); // UriType 549 } else if (name.equals("value")) { 550 this.value = castToString(value); // StringType 551 } else if (name.equals("period")) { 552 this.period = castToPeriod(value); // Period 553 } else if (name.equals("assigner")) { 554 this.assigner = castToReference(value); // Reference 555 } else 556 return super.setProperty(name, value); 557 return value; 558 } 559 560 @Override 561 public Base makeProperty(int hash, String name) throws FHIRException { 562 switch (hash) { 563 case 116103: return getUseElement(); 564 case 3575610: return getType(); 565 case -887328209: return getSystemElement(); 566 case 111972721: return getValueElement(); 567 case -991726143: return getPeriod(); 568 case -369881636: return getAssigner(); 569 default: return super.makeProperty(hash, name); 570 } 571 572 } 573 574 @Override 575 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 576 switch (hash) { 577 case 116103: /*use*/ return new String[] {"code"}; 578 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 579 case -887328209: /*system*/ return new String[] {"uri"}; 580 case 111972721: /*value*/ return new String[] {"string"}; 581 case -991726143: /*period*/ return new String[] {"Period"}; 582 case -369881636: /*assigner*/ return new String[] {"Reference"}; 583 default: return super.getTypesForProperty(hash, name); 584 } 585 586 } 587 588 @Override 589 public Base addChild(String name) throws FHIRException { 590 if (name.equals("use")) { 591 throw new FHIRException("Cannot call addChild on a singleton property Identifier.use"); 592 } 593 else if (name.equals("type")) { 594 this.type = new CodeableConcept(); 595 return this.type; 596 } 597 else if (name.equals("system")) { 598 throw new FHIRException("Cannot call addChild on a singleton property Identifier.system"); 599 } 600 else if (name.equals("value")) { 601 throw new FHIRException("Cannot call addChild on a singleton property Identifier.value"); 602 } 603 else if (name.equals("period")) { 604 this.period = new Period(); 605 return this.period; 606 } 607 else if (name.equals("assigner")) { 608 this.assigner = new Reference(); 609 return this.assigner; 610 } 611 else 612 return super.addChild(name); 613 } 614 615 public String fhirType() { 616 return "Identifier"; 617 618 } 619 620 public Identifier copy() { 621 Identifier dst = new Identifier(); 622 copyValues(dst); 623 dst.use = use == null ? null : use.copy(); 624 dst.type = type == null ? null : type.copy(); 625 dst.system = system == null ? null : system.copy(); 626 dst.value = value == null ? null : value.copy(); 627 dst.period = period == null ? null : period.copy(); 628 dst.assigner = assigner == null ? null : assigner.copy(); 629 return dst; 630 } 631 632 protected Identifier typedCopy() { 633 return copy(); 634 } 635 636 @Override 637 public boolean equalsDeep(Base other_) { 638 if (!super.equalsDeep(other_)) 639 return false; 640 if (!(other_ instanceof Identifier)) 641 return false; 642 Identifier o = (Identifier) other_; 643 return compareDeep(use, o.use, true) && compareDeep(type, o.type, true) && compareDeep(system, o.system, true) 644 && compareDeep(value, o.value, true) && compareDeep(period, o.period, true) && compareDeep(assigner, o.assigner, true) 645 ; 646 } 647 648 @Override 649 public boolean equalsShallow(Base other_) { 650 if (!super.equalsShallow(other_)) 651 return false; 652 if (!(other_ instanceof Identifier)) 653 return false; 654 Identifier o = (Identifier) other_; 655 return compareValues(use, o.use, true) && compareValues(system, o.system, true) && compareValues(value, o.value, true) 656 ; 657 } 658 659 public boolean isEmpty() { 660 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(use, type, system, value 661 , period, assigner); 662 } 663 664 665}