001package org.hl7.fhir.r4.model; 002 003/*- 004 * #%L 005 * org.hl7.fhir.r4 006 * %% 007 * Copyright (C) 2014 - 2019 Health Level 7 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023/* 024 Copyright (c) 2011+, HL7, Inc. 025 All rights reserved. 026 027 Redistribution and use in source and binary forms, with or without modification, 028 are permitted provided that the following conditions are met: 029 030 * Redistributions of source code must retain the above copyright notice, this 031 list of conditions and the following disclaimer. 032 * Redistributions in binary form must reproduce the above copyright notice, 033 this list of conditions and the following disclaimer in the documentation 034 and/or other materials provided with the distribution. 035 * Neither the name of HL7 nor the names of its contributors may be used to 036 endorse or promote products derived from this software without specific 037 prior written permission. 038 039 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 040 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 041 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 042 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 043 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 044 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 045 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 046 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 047 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 048 POSSIBILITY OF SUCH DAMAGE. 049 050*/ 051 052// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0 053import java.util.List; 054 055import org.hl7.fhir.exceptions.FHIRException; 056import org.hl7.fhir.instance.model.api.IAnyResource; 057import org.hl7.fhir.instance.model.api.IBaseReference; 058import org.hl7.fhir.instance.model.api.ICompositeType; 059import org.hl7.fhir.instance.model.api.IIdType; 060import org.hl7.fhir.utilities.Utilities; 061 062import ca.uhn.fhir.model.api.annotation.Child; 063import ca.uhn.fhir.model.api.annotation.DatatypeDef; 064import ca.uhn.fhir.model.api.annotation.Description; 065/** 066 * A reference from one resource to another. 067 */ 068@DatatypeDef(name="Reference") 069public class Reference extends BaseReference implements IBaseReference, ICompositeType { 070 071 /** 072 * A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources. 073 */ 074 @Child(name = "reference", type = {StringType.class}, order=0, min=0, max=1, modifier=false, summary=true) 075 @Description(shortDefinition="Literal reference, Relative, internal or absolute URL", formalDefinition="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources." ) 076 protected StringType reference; 077 078 /** 079 * The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent. 080 081The type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. "Patient" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources). 082 */ 083 @Child(name = "type", type = {UriType.class}, order=1, min=0, max=1, modifier=false, summary=true) 084 @Description(shortDefinition="Type the reference refers to (e.g. \"Patient\")", formalDefinition="The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)." ) 085 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-types") 086 protected UriType type; 087 088 /** 089 * An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference. 090 */ 091 @Child(name = "identifier", type = {Identifier.class}, order=2, min=0, max=1, modifier=false, summary=true) 092 @Description(shortDefinition="Logical reference, when literal reference is not known", formalDefinition="An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference." ) 093 protected Identifier identifier; 094 095 /** 096 * Plain text narrative that identifies the resource in addition to the resource reference. 097 */ 098 @Child(name = "display", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) 099 @Description(shortDefinition="Text alternative for the resource", formalDefinition="Plain text narrative that identifies the resource in addition to the resource reference." ) 100 protected StringType display; 101 102 private static final long serialVersionUID = 784245805L; 103 104 /** 105 * Constructor 106 */ 107 public Reference() { 108 super(); 109 } 110 111 /** 112 * Constructor 113 * 114 * @param theReference The given reference string (e.g. "Patient/123" or "http://example.com/Patient/123") 115 */ 116 public Reference(String theReference) { 117 super(theReference); 118 } 119 120 /** 121 * Constructor 122 * 123 * @param theReference The given reference as an IdType (e.g. "Patient/123" or "http://example.com/Patient/123") 124 */ 125 public Reference(IIdType theReference) { 126 super(theReference); 127 } 128 129 /** 130 * Constructor 131 * 132 * @param theResource The resource represented by this reference 133 */ 134 public Reference(IAnyResource theResource) { 135 super(theResource); 136 } 137 138 /** 139 * @return {@link #reference} (A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value 140 */ 141 public StringType getReferenceElement_() { 142 if (this.reference == null) 143 if (Configuration.errorOnAutoCreate()) 144 throw new Error("Attempt to auto-create Reference.reference"); 145 else if (Configuration.doAutoCreate()) 146 this.reference = new StringType(); // bb 147 return this.reference; 148 } 149 150 public boolean hasReferenceElement() { 151 return this.reference != null && !this.reference.isEmpty(); 152 } 153 154 public boolean hasReference() { 155 return this.reference != null && !this.reference.isEmpty(); 156 } 157 158 /** 159 * @param value {@link #reference} (A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value 160 */ 161 public Reference setReferenceElement(StringType value) { 162 this.reference = value; 163 return this; 164 } 165 166 /** 167 * @return A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources. 168 */ 169 public String getReference() { 170 return this.reference == null ? null : this.reference.getValue(); 171 } 172 173 /** 174 * @param value A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources. 175 */ 176 public Reference setReference(String value) { 177 if (Utilities.noString(value)) 178 this.reference = null; 179 else { 180 if (this.reference == null) 181 this.reference = new StringType(); 182 this.reference.setValue(value); 183 } 184 return this; 185 } 186 187 /** 188 * @return {@link #type} (The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent. 189 190The type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. "Patient" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 191 */ 192 public UriType getTypeElement() { 193 if (this.type == null) 194 if (Configuration.errorOnAutoCreate()) 195 throw new Error("Attempt to auto-create Reference.type"); 196 else if (Configuration.doAutoCreate()) 197 this.type = new UriType(); // bb 198 return this.type; 199 } 200 201 public boolean hasTypeElement() { 202 return this.type != null && !this.type.isEmpty(); 203 } 204 205 public boolean hasType() { 206 return this.type != null && !this.type.isEmpty(); 207 } 208 209 /** 210 * @param value {@link #type} (The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent. 211 212The type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. "Patient" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 213 */ 214 public Reference setTypeElement(UriType value) { 215 this.type = value; 216 return this; 217 } 218 219 /** 220 * @return The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent. 221 222The type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. "Patient" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources). 223 */ 224 public String getType() { 225 return this.type == null ? null : this.type.getValue(); 226 } 227 228 /** 229 * @param value The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent. 230 231The type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. "Patient" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources). 232 */ 233 public Reference setType(String value) { 234 if (Utilities.noString(value)) 235 this.type = null; 236 else { 237 if (this.type == null) 238 this.type = new UriType(); 239 this.type.setValue(value); 240 } 241 return this; 242 } 243 244 /** 245 * @return {@link #identifier} (An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.) 246 */ 247 public Identifier getIdentifier() { 248 if (this.identifier == null) 249 if (Configuration.errorOnAutoCreate()) 250 throw new Error("Attempt to auto-create Reference.identifier"); 251 else if (Configuration.doAutoCreate()) 252 this.identifier = new Identifier(); // cc 253 return this.identifier; 254 } 255 256 public boolean hasIdentifier() { 257 return this.identifier != null && !this.identifier.isEmpty(); 258 } 259 260 /** 261 * @param value {@link #identifier} (An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.) 262 */ 263 public Reference setIdentifier(Identifier value) { 264 this.identifier = value; 265 return this; 266 } 267 268 /** 269 * @return {@link #display} (Plain text narrative that identifies the resource in addition to the resource reference.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value 270 */ 271 public StringType getDisplayElement() { 272 if (this.display == null) 273 if (Configuration.errorOnAutoCreate()) 274 throw new Error("Attempt to auto-create Reference.display"); 275 else if (Configuration.doAutoCreate()) 276 this.display = new StringType(); // bb 277 return this.display; 278 } 279 280 public boolean hasDisplayElement() { 281 return this.display != null && !this.display.isEmpty(); 282 } 283 284 public boolean hasDisplay() { 285 return this.display != null && !this.display.isEmpty(); 286 } 287 288 /** 289 * @param value {@link #display} (Plain text narrative that identifies the resource in addition to the resource reference.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value 290 */ 291 public Reference setDisplayElement(StringType value) { 292 this.display = value; 293 return this; 294 } 295 296 /** 297 * @return Plain text narrative that identifies the resource in addition to the resource reference. 298 */ 299 public String getDisplay() { 300 return this.display == null ? null : this.display.getValue(); 301 } 302 303 /** 304 * @param value Plain text narrative that identifies the resource in addition to the resource reference. 305 */ 306 public Reference setDisplay(String value) { 307 if (Utilities.noString(value)) 308 this.display = null; 309 else { 310 if (this.display == null) 311 this.display = new StringType(); 312 this.display.setValue(value); 313 } 314 return this; 315 } 316 317 /** 318 * Convenience setter which sets the reference to the complete {@link IIdType#getValue() value} of the given 319 * reference. 320 * 321 * @param theReference The reference, or <code>null</code> 322 * @return 323 * @return Returns a reference to this 324 */ 325 public Reference setReferenceElement(IIdType theReference) { 326 if (theReference != null) { 327 setReference(theReference.getValue()); 328 } else { 329 setReference(null); 330 } 331 return this; 332 } 333 protected void listChildren(List<Property> children) { 334 super.listChildren(children); 335 children.add(new Property("reference", "string", "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", 0, 1, reference)); 336 children.add(new Property("type", "uri", "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).", 0, 1, type)); 337 children.add(new Property("identifier", "Identifier", "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.", 0, 1, identifier)); 338 children.add(new Property("display", "string", "Plain text narrative that identifies the resource in addition to the resource reference.", 0, 1, display)); 339 } 340 341 @Override 342 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 343 switch (_hash) { 344 case -925155509: /*reference*/ return new Property("reference", "string", "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", 0, 1, reference); 345 case 3575610: /*type*/ return new Property("type", "uri", "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).", 0, 1, type); 346 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.", 0, 1, identifier); 347 case 1671764162: /*display*/ return new Property("display", "string", "Plain text narrative that identifies the resource in addition to the resource reference.", 0, 1, display); 348 default: return super.getNamedProperty(_hash, _name, _checkValid); 349 } 350 351 } 352 353 @Override 354 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 355 switch (hash) { 356 case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // StringType 357 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // UriType 358 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 359 case 1671764162: /*display*/ return this.display == null ? new Base[0] : new Base[] {this.display}; // StringType 360 default: return super.getProperty(hash, name, checkValid); 361 } 362 363 } 364 365 @Override 366 public Base setProperty(int hash, String name, Base value) throws FHIRException { 367 switch (hash) { 368 case -925155509: // reference 369 this.reference = castToString(value); // StringType 370 return value; 371 case 3575610: // type 372 this.type = castToUri(value); // UriType 373 return value; 374 case -1618432855: // identifier 375 this.identifier = castToIdentifier(value); // Identifier 376 return value; 377 case 1671764162: // display 378 this.display = castToString(value); // StringType 379 return value; 380 default: return super.setProperty(hash, name, value); 381 } 382 383 } 384 385 @Override 386 public Base setProperty(String name, Base value) throws FHIRException { 387 if (name.equals("reference")) { 388 this.reference = castToString(value); // StringType 389 } else if (name.equals("type")) { 390 this.type = castToUri(value); // UriType 391 } else if (name.equals("identifier")) { 392 this.identifier = castToIdentifier(value); // Identifier 393 } else if (name.equals("display")) { 394 this.display = castToString(value); // StringType 395 } else 396 return super.setProperty(name, value); 397 return value; 398 } 399 400 @Override 401 public Base makeProperty(int hash, String name) throws FHIRException { 402 switch (hash) { 403 case -925155509: return getReferenceElement_(); 404 case 3575610: return getTypeElement(); 405 case -1618432855: return getIdentifier(); 406 case 1671764162: return getDisplayElement(); 407 default: return super.makeProperty(hash, name); 408 } 409 410 } 411 412 @Override 413 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 414 switch (hash) { 415 case -925155509: /*reference*/ return new String[] {"string"}; 416 case 3575610: /*type*/ return new String[] {"uri"}; 417 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 418 case 1671764162: /*display*/ return new String[] {"string"}; 419 default: return super.getTypesForProperty(hash, name); 420 } 421 422 } 423 424 @Override 425 public Base addChild(String name) throws FHIRException { 426 if (name.equals("reference")) { 427 throw new FHIRException("Cannot call addChild on a primitive type Reference.reference"); 428 } 429 else if (name.equals("type")) { 430 throw new FHIRException("Cannot call addChild on a primitive type Reference.type"); 431 } 432 else if (name.equals("identifier")) { 433 this.identifier = new Identifier(); 434 return this.identifier; 435 } 436 else if (name.equals("display")) { 437 throw new FHIRException("Cannot call addChild on a primitive type Reference.display"); 438 } 439 else 440 return super.addChild(name); 441 } 442 443 public String fhirType() { 444 return "Reference"; 445 446 } 447 448 public Reference copy() { 449 Reference dst = new Reference(); 450 copyValues(dst); 451 dst.reference = reference == null ? null : reference.copy(); 452 dst.type = type == null ? null : type.copy(); 453 dst.identifier = identifier == null ? null : identifier.copy(); 454 dst.display = display == null ? null : display.copy(); 455 return dst; 456 } 457 458 protected Reference typedCopy() { 459 return copy(); 460 } 461 462 @Override 463 public boolean equalsDeep(Base other_) { 464 if (!super.equalsDeep(other_)) 465 return false; 466 if (!(other_ instanceof Reference)) 467 return false; 468 Reference o = (Reference) other_; 469 return compareDeep(reference, o.reference, true) && compareDeep(type, o.type, true) && compareDeep(identifier, o.identifier, true) 470 && compareDeep(display, o.display, true); 471 } 472 473 @Override 474 public boolean equalsShallow(Base other_) { 475 if (!super.equalsShallow(other_)) 476 return false; 477 if (!(other_ instanceof Reference)) 478 return false; 479 Reference o = (Reference) other_; 480 return compareValues(reference, o.reference, true) && compareValues(type, o.type, true) && compareValues(display, o.display, true) 481 ; 482 } 483 484 public boolean isEmpty() { 485 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(reference, type, identifier 486 , display); 487 } 488 489 490} 491