Right now, always the newest version of any resource is referenced, no matter what it was at creation time of the referencing resource. There are 2 use cases where vesion specific references are needed:
The Consent resource is linking to a QuestionnaireResponse resource that states the information that was shown to the patient. The Consent resource should link to the information at exactly that moment for documentation purposes of that snapshot of information. This is important in case the information was updated, we don't want the patient to automatically consent to the newer version without reading it (what would be the case with the references so far).
The Provenance resource signs a Consent. If the Consent resource is updated (e.g. from status active to rejected), the "old" signature should still be linked to whatever was signed at the moment of signature and not to the most recent version of the Consent.
Right now, always the newest version of any resource is referenced, no matter what it was at creation time of the referencing resource. There are 2 use cases where vesion specific references are needed:
The Consent resource is linking to a QuestionnaireResponse resource that states the information that was shown to the patient. The Consent resource should link to the information at exactly that moment for documentation purposes of that snapshot of information. This is important in case the information was updated, we don't want the patient to automatically consent to the newer version without reading it (what would be the case with the references so far).
The Provenance resource signs a Consent. If the Consent resource is updated (e.g. from status active to rejected), the "old" signature should still be linked to whatever was signed at the moment of signature and not to the most recent version of the Consent.
See versioned references of hapi doc to figure out how this can be achived: http://hapifhir.io/doc_resource_references.html