Describe the bug
I’m trying to use FHIR Bundle transaction to write multiple co-referenced resources to the server at once.
The challenge is that any of those resources may or may not already be on the server. To address that I’m using “Conditional Create” and “Condition update” with “Conditional References” features.
The bundle have entries as follows:
“Organization” resource – create if none exist
“Location” resource” – create if none exist
“ResearchStudy” resource that contains a “Conditional References” to the organization and location resources – Update\Update as Create(if none exist)
This setup works for the first time creation, but if the Organization/Location are already created (same bundle, second call), the transaction will succeed,
but the condition reference in the research study will be translated to reference GUID that doesn’t exist.
Describe the bug I’m trying to use FHIR Bundle transaction to write multiple co-referenced resources to the server at once. The challenge is that any of those resources may or may not already be on the server. To address that I’m using “Conditional Create” and “Condition update” with “Conditional References” features. The bundle have entries as follows: “Organization” resource – create if none exist “Location” resource” – create if none exist “ResearchStudy” resource that contains a “Conditional References” to the organization and location resources – Update\Update as Create(if none exist)
This setup works for the first time creation, but if the Organization/Location are already created (same bundle, second call), the transaction will succeed, but the condition reference in the research study will be translated to reference GUID that doesn’t exist.
Example: (full bundle attached) First call: Organization?name:exact=Janssen Sciences Ireland UC Returning bundle: Organization resource url: Organization/
ResearchStudy organization reference: Organization/
Second call: Organization?name:exact=Janssen Sciences Ireland UC Returning bundle: Organization resource: success 200 (no returning url, because the resource already exists) ResearchStudy organization reference: Organization/
To Reproduce Steps to reproduce the behavior:
Expected behavior the resources inner reference should be pointing to the resources created in the first call
Actual behavior the resources inner references are broken
Transaction body: FHIRbug-post.txt