References are always defined and represented in one direction – from one resource (source) to another (target). The corresponding reverse relationship from the target to the source exists in a logical sense, but is not typically represented explicitly in the target resource. For external references, navigating these reverse relationships requires some external infrastructure to track the relationship between resources (the REST application program interface (API) provides one such infrastructure by providing the ability to search the reverse relationship by naming search parameters for the references and by providing support for reverse includes).
Because resources are processed independently, relationships are not considered to be transitive. For example, if a Procedure resource references a Patient as its subject, and has a Procedure resource as its reason, there is no automatic rule or implication that the condition has the same patient for its subject. Instead, the subject of the condition must be established directly in the Condition resource itself. Another way to state this is that the context of the subject is not “inherited”, nor does it “conduct” along the relationship to condition. The only exception to this is the case of contained resources. Note that in practice, the relationships need to describe a logical and coherent record, and in the case of the Condition and Procedure described here, they would usually be required to have the same patient for their subjects. Profiles and/or implementation guides may make rules about this.
This specification describes the use of references to other resources that have the same Fast Healthcare Interoperability Resources (FHIR) version as the source of the reference. Expected behavior for references across FHIR versions is presently undefined. References are made to resource based on their identity; there are several different identities to refer to.
Resources contain two types of references to other resources:
– Resource references – general references between resources
– Canonical references – references to resources by their canonical Universal Resource Locator (URL)