-
Notifications
You must be signed in to change notification settings - Fork 1
Resolving references from Synthea Patient Files and Handling Other Bundles
In the properties file of Synthea, there is a config called fhir.transaction_bundle that was set to True by default. This generates patient files with conditional references to resources where ?identifier=
is used in the reference. The Bundles are of type "Transaction". All servers except IRIS are able to resolve these references. Whereas Iris, throws an error that it cannot resolve those references. This is also because it tries to look for those references with search parameters in its server and cannot find them. Servers may choose to resolve conditional references. If it does not, it returns 401.
But when setting fhir.transaction_bundle to False in Synthea. The patient file generated was of resourceType Collection, which was accepted by all the servers. Here, the references were logical references that the servers could resolve.
However, there is a difference in how the collection and transaction resource types in bundles are processed. E.g., All operations in the bundle are executed as a single atomic database transaction. If failures occur, the entire transaction is rolled back, and the system is left in its previous state. In transaction, the data can be accessed as individual resources later on. You can query just for the patient data, medication data, etc. However, collections have no other FHIR specification than just containing all the resources. Also, even if one resource fails in transaction, it is not rolled back. It has no transactional or batch processing constraints. Collections type also does not have request object for each resource. The understanding is that, because of this, the resources are not posted to their individual endpoints. (Correct ?)
To check if a server can resolve logical references, head over to the server's capability statement reference policy to see if the flag to resolve is it. If it is, the server should be able to accept files with logical references.
https://fhir-drills.github.io/bundle.html