PATCH Bundle not resolving URN replacement?
# support
y
I'm writing a migration script which is associating managing organizations to patients. For this, I'm constructing a bundle like the one in this gist: https://gist.github.com/yale/0a98c9843e876cc2591e6ded9b1c1cfd The base64 encoded jsonpatch payload in the PATCH bundle entry is this:
Copy code
[{"op":"add","path":"/managingOrganization","value":{"reference":"urn:uuid:6e72c801-ae8e-467a-890e-c05af0db25bf"}}]
It executes successfully, however, the reference URN is not resolved properly (see screenshot). For other resources created using POST bundle entries (for example,
Coverage
resources), the URNs resolve to actual references. Is this URN resolution functionality not supported with PATCH bundle entries?
r
Hi @yaaaaale - this might be a limitation of the spec on Patches in Bundles, or on our batch processor. I will take a look and report back
In this case though, i would recommend re-ordering your bundle. If you create the managing organization first, then you shouldn't have a problem with a simple POST for the
Patient
y
Thanks @rahul1! We went ahead and created the managing organizations first, and used that bundle output to generate a
Record<string, Reference<Organization>>
mapping that the next bundle migration can use.
r
165 Views