What should be the Resource.id when the resource is not identifiable by itself

We are building a middleware system that

  1. delivers user requests to the corresponding source systems
  2. upon receiving responses, it consolidates the data and maps to FHIR resource.
  3. returns the FHIR resources as response (in a Bundle) to the caller.

During the process, we are not allowed to store any data due to legislation rules. Some of the systems do not or are unable to provide us any identifiers that we could use as the Resource.id. So we are not sure if we could just construct an urn with a 32-bit GUID (guarantee uniqueness) as the Resource.id in our FHIR resources.

Any words to help out would be much appreciated!


Hi Amy,

if the user requests are searches/queries then you should be able to use other search parameters to locate the resource(s) you are interested in, if you do not know the id(s) for the resource(s) you are interested in - See https://www.hl7.org/fhir/search.html for more information

if the user requests are create operations, you could send the request as as bundle in which you assign temporary resource IDs (GUIDs) to resources in order to create the references between each resource. Then depending on the way you upload the Bundle to the server the server can use your IDs to understand the linkage between resources and will assign its own server IDs and update all the existing references with the new IDs. In these cases, the server will then reply with a return Bundle that informs you of these updated IDs - see https://fhir-drills.github.io/bundle.html for more infor.

Thanks Blessed.
The user requests are searches or queries to our FHIR server and then we submit various requests to the source systems that are not RESTful. When we get the responses back from the source systems, we formulate them into FHIR Bundle. Our issue lies within the transformation of data from source (various format) into FHIR. Source data could be a summary of patient clinical data that do not necessarily have an identifier. We need the id when we put them into FHIR resources to be conformant to the FHIR rules. If we assign a temporary resource id in the process we would not be able to use that id, for example in the fullURL element since we would not be able to locate the same resource by the temp id and it is also due to the fact that we do not store the data. We are basically providing a pass-thru service.

Regarding this:

When you PUT the FHIR resources onto the server you should get confirmation of the ids allocated these resources by the FHIR destination server and you can then update the resources you initially created in you exchange system to include the FHIR server allocated id.

Alternatively you could have a number wheel (e.g. some sort of id generator service) that you can use in your system to generate ids for these resources that you are creating yourself, and send these as the identifiers for your resources, I guess together with a system identifier that identifies them with your local identifiers repository