pub struct Reference(pub Box<ReferenceInner>);
Expand description
Reference Type: A reference from one resource to another.
Reference v5.0.0
A reference from one resource to another
A reference from one resource to another.
References SHALL be a reference to an actual FHIR resource, and SHALL be resolvable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.
Tuple Fields§
§0: Box<ReferenceInner>
Implementations§
Source§impl Reference
impl Reference
Sourcepub fn parse(&self) -> Option<ParsedReference<'_>>
pub fn parse(&self) -> Option<ParsedReference<'_>>
Parse the Reference
into a ParsedReference
. Returns None
if the reference
field is empty..
Sourcepub fn local(ty: ResourceType, id: &str) -> Reference
pub fn local(ty: ResourceType, id: &str) -> Reference
Create a new local reference for the given ID. Make sure the
resource is going to be in the contained
field of the
referencing resource.
Sourcepub fn local_to<R>(resource: &R) -> Option<Reference>where
R: NamedResource + BaseResource,
pub fn local_to<R>(resource: &R) -> Option<Reference>where
R: NamedResource + BaseResource,
Create local Reference
to the given resource. Make sure the
resource is going to be in the contained
field of the
referencing resource.
Sourcepub fn relative(ty: ResourceType, id: &str) -> Reference
pub fn relative(ty: ResourceType, id: &str) -> Reference
Create a new relative reference for the given resource type and ID.
Sourcepub fn relative_to<R>(resource: &R) -> Option<Reference>where
R: NamedResource + BaseResource,
pub fn relative_to<R>(resource: &R) -> Option<Reference>where
R: NamedResource + BaseResource,
Create relative Reference
to the given resource.