6

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?

mg0880gm
  • 65
  • 1
  • 5

1 Answers1

8

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.

Grahame Grieve
  • 3,538
  • 3
  • 15
  • 17
  • Thanks a lot for the insight. May I ask is this understanding correct? For RESTful API like update, client must provide a `id` for create/update, but server could use it by primary key, but not necessary. No matter what value been used as primary key, the server should return the `location` infor of created resource to client, such that client could read later? – mg0880gm Apr 26 '19 at 16:40
  • Also may I ask what's the usual `external identifier` for `MedicationDispense` or `MedicationRequest`? The `provider` and `patient` example is easier to understand. But for prescription it varies for patient, condition etc. – mg0880gm Apr 26 '19 at 16:43
  • create - server ignores the id if one is provided. update - server must use id, or return an error. External Identifier for MedicationDispense etc is usually assigned by originating system - and often is associated with legacy paper processes (i.e. it used to be printed on the paper prescription etc) – Grahame Grieve Apr 26 '19 at 20:07
  • The difference between a local id and a business identifier is quite clear, but there are some details not defined explicitly enough in the official documentation. In the definition of 'Identifier' you have a type, a system, and a value. Within 'type' the 'system' field defines the terminological system and 'code' is the code within the latter. What is the role of 'assigner' field in an identifier: is this not equivalent to 'system'? Or is it a purely descriptive field? (I was unable to request for a patient containing an identifier with an assigner from any of FHIR servers known to me). – Stanislav Koncebovski Mar 15 '22 at 08:28
  • Assigner is mainly used in administrative workflows where you have multiple systems issuing identifiers in the same space. eg. for identifying humans. Drivers's licenses, hospital record numbers for merged hospitals. Mostly there's only one assigner, and it's left blank – Grahame Grieve Mar 15 '22 at 12:15