Understanding IDs

There are different places in JSON where ID, identifiers, UUIDs are present and it may be complex to understand. This page will try to clarify this.

Resource IDs

This is the id attribute of any resource, representing a technical identifier. It is also called in the FHIR specification "Logical ID". It is unique within the space of all resources of the same type on the same server. Once assigned by the server, it is never changed. When you're sending elements to the platform, you MAY give an id to each, or some resources, as long as it respects its official definition. In the examples provided in the specification, we wrote it.

However, it will be completely ignored by the server and you SHALL NOT expect to find it back. The server assigns its own ID to each resource. In our configuration, it will be an UUID, for example: d017e60d-8972-4c10-b742-8139c6407dac.

As a consequence, when you request elements, each resource will have an id but not the one you (potentially) provided.

Identifier

This is the identifer element having system and value. It represents a "business identifier" of a ressource, and may be present more than one time. system represents the type of identifier, and value the actual value. For example, a doctor can be identified by its code prestataire (for billing) and by its eHealthID. It is not changed by the server.

Example

IDs example1

This patient has a technical id of d017e60d-8972-4c10-b742-8139c6407dac, but the system 1.3.182.4.4 representing the matricules, we can deduce that this patient has a matricule of 1901020300114.

Referring to a resource with its identifier

In different places in the specification, when sending information, we refer to existing resources instead of wrtiting them again and again. This ensures better data quality. For example, Organizations are referred by thier eHealthID. Agence eSanté is responsible for maintening on the server the up-to-date organization information.

The format for this is : ResourceType?identifier=system|value

Ex: Organization?identifier=urn:oid:1.3.182.4.1|1432589450

Every time you see such a reference, you can deduce that this is a resource already present on the server.

fullURL

Inside Bundles, you will find entry.fullURL.

The role of fullURL is to make the link between elements within a Bundle. For example, inside a Bundle you provide a prescription (CarePlan), and several prescription lines (ServiceRequest or MedicationRequest). You want to say that the lines belongs to the prescription. You link them using fullURL like this for example: urn:uuid:51df1d37-fd26-4aa6-8f0a-d9e53ad1c5d7. This means: look inside the Bundle at the entry having fullURL = urn:uuid:51df1d37-fd26-4aa6-8f0a-d9e53ad1c5d7.

This is the difference with the identifier:

  • identifier links to a resource on the server
  • fullURL links to a resource within the Bundle

When you send elements, fullURL will only be used by the server to undestand the relation between the elements inside a Bundle. The server nevers stores fullURL and will completely forget about them.

When you retrieve elements like a prescription, we configure the system so that all necessary information (Patient, Prescriber, ...) is returned directly in the response. This means that all resources will be available inside the Bundle wihtout the need of further calls on the server. As a consequence, all resources in the Bundle will be linked with fullURL.

You SHALL NOT expect that the fullURL will have something to do with what you sent, nor that two identicals calls will result in a Bundle with the same fullURL inside (even though it MAY be the case).