Hi,
When referencing internally (between model entities), we are unsure about how to use resource references. Since we want to refer to our internal models, and hence not use a URL but instead internal ids, we are unsure whether to use reference.id, reference.identifier.value or reference.reference. Are there any best practices?
Reference.id isn’t for referencing at all - it’s so you can refer to the ‘reference’ element from elsewhere - typically from narrative or from Provenance.
Reference.reference is the preferred mechanism because search chaining, _include, _revinclude, etc. depend on Reference.reference. However, if the referenced content isn’t available for retrieval at a RESTful endpoint, then you can’t use Reference.reference
Reference.identifier is generally used when the referenced content doesn’t exist at a RESTful endpoint and so you specify a business identifier and leave it up to business logic/arbitrary business processes to figure out what record that actually means or how to resolve the reference.