Stream: dotnet
Topic: Bundle reponse
Yener Topal (Jul 12 2018 at 12:04):
I would like to know if there is documentation that describes how I need to build a response object to a client in JSON format.
Context
After deserializing a Bundle object with a type=document, I would like to send a response object back as given in an example on:
- https://www.hl7.org/fhir/bundle-response.json.html.
Question
What I am missing is the exact rules that I need to follow, could someone give me a pointer?
Christiaan Knaap (Jul 12 2018 at 13:21):
A document bundle can be sent to three different endpoints, with different behaviour: http://hl7.org/fhir/documents.html#bundle.
/Bundle and /Composition are clear: that is either a create or an update. The response to a POST on the root is not explicitly described. I think that deserves a GForge ticket. (bottom of page in spec: "Propose a change", requires a one-time free registration with the HL7 GForge issue system).
Yener Topal (Jul 13 2018 at 07:20):
A document bundle can be sent to three different endpoints, with different behaviour: http://hl7.org/fhir/documents.html#bundle.
/Bundle and /Composition are clear: that is either a create or an update. The response to a POST on the root is not explicitly described. I think that deserves a GForge ticket. (bottom of page in spec: "Propose a change", requires a one-time free registration with the HL7 GForge issue system).
Does that mean that I simple reply with a http 201 message to the client in my case because it is not a transaction? The example bundle-response.json I linked differs from a Bundle with type=document because it gives a http response code for every entry?
Christiaan Knaap (Jul 16 2018 at 13:50):
The bundle-response.json example is the response to a bundle of type 'transaction', as can be seen by its type: "type": "transaction-response"
. So indeed it has a response for every entry that was in the original request bundle, as specified by the transaction interaction here. It is unrelated to bundles of type 'document', except that both use the Bundle resource as a packaging mechanism.
Last updated: Apr 12 2022 at 19:14 UTC