You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tl;dr Bundles of type transaction sent to Hearth with a POST will fail. I realized bundle transactions may or may not be supported by servers, or I made a mistake but this does work on http://fhirtest.uhn.ca/baseDstu3/
Reproduction:
Generate synthea fake record.
Modify the type to be transaction.
Add POST method and URL to each resource under entry.
POST to Hearth.
Error: 'Specifying an id is not allowed on a create action'
The text was updated successfully, but these errors were encountered:
Hey Richard, transactions should work, we have used them before in other work. It looks like it is rejecting this because an id field already exists on the resources, we don't support supplying your own ids when creating resources which is causing the issue - https://github.com/jembi/hearth/blob/master/lib/fhir/core.js#L358
I can see bundles for batching working, but not really bundles for transactions. The use case is preserving the references between resources in a bundle that is submitted to the server for creation. In order to do that it requires that there be IDs already. The server may replace every ID (as it should control its own namespace), but at least the references remain. Is there another way I can submit a transaction (not batch) bundle but retain the relationships between resources?
tl;dr Bundles of type transaction sent to Hearth with a POST will fail. I realized bundle transactions may or may not be supported by servers, or I made a mistake but this does work on http://fhirtest.uhn.ca/baseDstu3/
Reproduction:
POST to Hearth.
Error: 'Specifying an id is not allowed on a create action'
The text was updated successfully, but these errors were encountered: