FHIR Chat · Composition creation in a document bundle · hapi

Stream: hapi

Topic: Composition creation in a document bundle


view this post on Zulip Edouard Gence (Sep 25 2019 at 08:32):

Hi all! We are trying to create a composition using a bundle in order to simultaneously create a composition and conditions. We managed to validate our bundle with the .NET validator. Now we are trying to populate the database with the multiple entries of the bundle (1 composition and 2 conditions). When we do so on the hapi server we get the following error:

Operation was unsuccessful because of a client error (BadRequest). OperationOutcome: <div xmlns="http://www.w3.org/1999/xhtml"><h1>Operation Outcome</h1><table border="0"><tr><td style="font-weight: bold;">ERROR</td><td>[]</td><td><pre>Unable to process transaction where incoming Bundle.type = document</pre></td></tr></table></div>.

Here is our bundle example: https://chat.fhir.org/user_uploads/10155/dJDmrlJtIJlWP3unEuOcE60y/Untitled-1

Any ideas??

view this post on Zulip Edouard Gence (Sep 25 2019 at 09:17):

So we managed to make it work. We changed Bundle.type="document" to Bundle.type="transaction". Moreover since the type transaction implies a request element in the bundle, we added the following:
<request>
<method value="POST" />
<url value="Composition" />
</request>
This populated the entries correctly even though it is specifically said on the composition resource that it should be "document". If anyone knows why "document" didn't work and why "transaction" did please tell us. For now we will stick to transaction.

view this post on Zulip James Agnew (Oct 01 2019 at 00:24):

What was the URL you were posting this to?


Last updated: Apr 12 2022 at 19:14 UTC