问题
The Resource
entity define an id
attribute as "Logical id of this artifact". Meanwhile for resources like MedicationRequest
also define an attribute named identifier
. The description is "External identifier" or "Business identifier".
I'm wondering what's the difference between these two attributes? From the RESTful API definition like update
, the id
can be used to uniquely locate the resource, like POST [base]/[resource]/[id]
. After POST
another GET
should be able to retrieve that resource using GET [base]/[resource]/[id]
. It's more like something similar to a storage identifier. Then how about that identifier
?
回答1:
the .id is controlled by the local server. As a resource is coped from server to server, it will change. it's basically the internal primary key for the object, and it's entirely controlled by the FHIR server itself (or, more precisely, by the interaction between the client and server). So it's not a portable identifier.
But almost all the resources correspond to (somewhat) real world entities that also are recorded in other systems, and that are assigned portable identifiers that are used across multiple systems to track the entity. These identifiers are constant as a resource (or other forms of representation of the real world entity) are copied around and moved from place to place. Some identifiers are assigned by external (government) agencies. Identifiers includes things like Patient MRNs, Provider Numbers etc. Often, because of distributed record processing, entities have many identifiers to carry, and there's a whole business in arbitrating between them.
来源:https://stackoverflow.com/questions/55861712/whats-the-difference-between-id-and-identifier-for-a-fhir-resource