
Package org.hl7.fhir.r5.model
Class Reference
java.lang.Object
org.hl7.fhir.r5.model.Base
org.hl7.fhir.r5.model.Element
org.hl7.fhir.r5.model.DataType
org.hl7.fhir.r5.model.BaseReference
org.hl7.fhir.r5.model.Reference
- All Implemented Interfaces:
- ca.uhn.fhir.model.api.IElement,- Serializable,- org.hl7.fhir.instance.model.api.IBase,- org.hl7.fhir.instance.model.api.IBaseDatatype,- org.hl7.fhir.instance.model.api.IBaseElement,- org.hl7.fhir.instance.model.api.IBaseHasExtensions,- org.hl7.fhir.instance.model.api.IBaseReference,- org.hl7.fhir.instance.model.api.ICompositeType
public class Reference
extends BaseReference
implements org.hl7.fhir.instance.model.api.IBaseReference, org.hl7.fhir.instance.model.api.ICompositeType
Reference Type: A reference from one resource to another.
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class org.hl7.fhir.r5.model.BaseBase.ProfileSource, Base.ValidationInfo, Base.ValidationMode, Base.ValidationReason
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected StringTypePlain text narrative that identifies the resource in addition to the resource reference.protected IdentifierAn identifier for the target resource.protected StringTypeA reference to a location at which the other resource is found.protected UriTypeThe expected type of the target of the reference.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncopy()voidcopyValues(Reference dst) booleanequalsDeep(Base other_) booleanequalsShallow(Base other_) fhirType()getNamedProperty(int _hash, String _name, boolean _checkValid) Base[]getProperty(int hash, String name, boolean checkValid) getType()String[]getTypesForProperty(int hash, String name) booleanbooleanbooleanbooleanbooleanbooleanhasType()booleanbooleanisEmpty()protected voidlistChildren(List<Property> children) makeProperty(int hash, String name) booleanvoidremoveChild(String name, Base value) setDisplay(String value) setDisplayElement(StringType value) setIdentifier(Identifier value) setProperty(int hash, String name, Base value) setProperty(String name, Base value) setReference(String value) setReferenceElement(org.hl7.fhir.instance.model.api.IIdType theReference) Convenience setter which sets the reference to the completevalueof the given reference.setReferenceElement(StringType value) setTypeElement(UriType value) toString()protected ReferenceMethods inherited from class org.hl7.fhir.r5.model.BaseReferencecopyValues, getReferenceElement, getResource, setResourceMethods inherited from class org.hl7.fhir.r5.model.DataTypecopyValues, getTranslation, isTranslatableMethods inherited from class org.hl7.fhir.r5.model.ElementaddExtension, addExtension, addExtension, copyExtensions, copyNewExtensions, getExtension, getExtensionByUrl, getExtensionByUrl, getExtensionFirstRep, getExtensionsByUrl, getExtensionsByUrl, getExtensionString, getExtensionString, getExtensionValue, getFHIRPublicationVersion, getId, getIdBase, getIdElement, getStandardsStatus, hasExtension, hasExtension, hasExtension, hasExtension, hasId, hasIdElement, isDisallowExtensions, noExtensions, removeExtension, setDisallowExtensions, setExtension, setId, setIdBase, setIdElement, setStandardsStatusMethods inherited from class org.hl7.fhir.r5.model.BaseaddDefinition, addFormatCommentsPost, addFormatCommentsPre, addValidationMessage, canHavePrimitiveValue, children, clearUserData, compareDeep, compareDeep, compareDeep, compareDeep, compareValues, compareValues, copyFormatComments, copyUserData, copyValues, dateTimeValue, equals, executeFunction, getChildByName, getChildValueByName, getFormatCommentsPost, getFormatCommentsPre, getNamedProperty, getUserData, getUserInt, getUserString, getValidationInfo, getValidationMessages, getXhtml, hasFormatComment, hasFormatCommentPost, hasFormatCommentPre, hasPrimitiveValue, hasType, hasUserData, hasValidated, hasValidationInfo, hasValidationMessages, isBooleanPrimitive, isCopyUserData, isDateTime, isMetadataBased, isPrimitive, isResource, listChildrenByName, listChildrenByName, primitiveValue, setCopyUserData, setUserData, setUserDataINN, setXhtmlMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hl7.fhir.instance.model.api.IBasegetFormatCommentsPost, getFormatCommentsPre, getUserData, hasFormatComment, setUserDataMethods inherited from interface org.hl7.fhir.instance.model.api.IBaseElementgetUserData, setUserDataMethods inherited from interface org.hl7.fhir.instance.model.api.IBaseReferencegetReferenceElement, getResource, setIdentifier, setResource
- 
Field Details- 
referenceA 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.
- 
typeThe 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. The 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).
- 
identifierAn 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.
- 
displayPlain text narrative that identifies the resource in addition to the resource reference.
 
- 
- 
Constructor Details- 
Referencepublic Reference()Constructor
- 
ReferenceConstructor- Parameters:
- theReference- The given reference string (e.g. "Patient/123" or "http://example.com/Patient/123")
 
- 
ReferenceConstructor- Parameters:
- theReference- The given reference as an IdType (e.g. "Patient/123" or "http://example.com/Patient/123")
 
- 
ReferenceConstructor- Parameters:
- theResource- The resource represented by this reference
 
 
- 
- 
Method Details- 
getReferenceElement_- Returns:
- 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
 
- 
hasReferenceElement
- 
hasReference
- 
setReferenceElement- Parameters:
- value-- 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
 
- 
getReference- Returns:
- 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.
 
- 
setReference- Specified by:
- setReferencein interface- org.hl7.fhir.instance.model.api.IBaseReference
- Parameters:
- 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.
 
- 
getTypeElement- Returns:
- 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. The 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
 
- 
hasTypeElement
- 
hasType
- 
setTypeElement- Parameters:
- value-- 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. The 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
 
- 
getType- Returns:
- 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. The 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).
 
- 
setType- Parameters:
- 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. The 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).
 
- 
getIdentifier- Specified by:
- getIdentifierin interface- org.hl7.fhir.instance.model.api.IBaseReference
- Returns:
- 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.)
 
- 
hasIdentifier- Specified by:
- hasIdentifierin interface- org.hl7.fhir.instance.model.api.IBaseReference
 
- 
setIdentifier- Parameters:
- value-- 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.)
 
- 
getDisplayElement- Specified by:
- getDisplayElementin interface- org.hl7.fhir.instance.model.api.IBaseReference
- Returns:
- 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
 
- 
hasDisplayElement
- 
hasDisplay
- 
setDisplayElement- Parameters:
- value-- 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
 
- 
getDisplay- Returns:
- Plain text narrative that identifies the resource in addition to the resource reference.
 
- 
setDisplay- Specified by:
- setDisplayin interface- org.hl7.fhir.instance.model.api.IBaseReference
- Parameters:
- value- Plain text narrative that identifies the resource in addition to the resource reference.
 
- 
listChildren- Overrides:
- listChildrenin class- Element
 
- 
getNamedPropertypublic Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws org.hl7.fhir.exceptions.FHIRException - Overrides:
- getNamedPropertyin class- Element
- Throws:
- org.hl7.fhir.exceptions.FHIRException
 
- 
getPropertypublic Base[] getProperty(int hash, String name, boolean checkValid) throws org.hl7.fhir.exceptions.FHIRException - Overrides:
- getPropertyin class- Element
- Throws:
- org.hl7.fhir.exceptions.FHIRException
 
- 
setPropertypublic Base setProperty(int hash, String name, Base value) throws org.hl7.fhir.exceptions.FHIRException - Overrides:
- setPropertyin class- Element
- Throws:
- org.hl7.fhir.exceptions.FHIRException
 
- 
setProperty- Overrides:
- setPropertyin class- Element
- Throws:
- org.hl7.fhir.exceptions.FHIRException
 
- 
removeChild- Overrides:
- removeChildin class- Element
- Throws:
- org.hl7.fhir.exceptions.FHIRException
 
- 
makeProperty- Overrides:
- makePropertyin class- Element
- Throws:
- org.hl7.fhir.exceptions.FHIRException
 
- 
getTypesForPropertypublic String[] getTypesForProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException - Overrides:
- getTypesForPropertyin class- Element
- Throws:
- org.hl7.fhir.exceptions.FHIRException
 
- 
addChild
- 
fhirType
- 
copy
- 
copyValues
- 
typedCopy
- 
equalsDeep- Overrides:
- equalsDeepin class- Element
 
- 
equalsShallow- Overrides:
- equalsShallowin class- Element
 
- 
isEmpty- Specified by:
- isEmptyin interface- org.hl7.fhir.instance.model.api.IBase
- Overrides:
- isEmptyin class- BaseReference
 
- 
toString
- 
setReferenceElementConvenience setter which sets the reference to the completevalueof the given reference.- Parameters:
- theReference- The reference, or- null
- Returns:
 
- 
matches
 
-