Stream: hapi
Topic: bunde entry.response issue
Anton Zhuchkov (Feb 05 2019 at 08:44):
Hi,
I have the issue with HAPI >= 3.6.0
according to the constarints defined by the FHIR spec for a bundle resource, particulary bdl-4 constraint, which states:
"entry.response mandatory for batch-response/transaction-response/history, otherwise prohibquote
, there is no «entry.response» allowed for bundle.type = searchset.
However, Schematron validator returns error
{ "resourceType": "OperationOutcome", "text": { "status": "generated", "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[Bundle]</td><td><pre>[error] in /*:Bundle[namespace-uri()='http://hl7.org/fhir'][1] @ Bundle bdl-4: entry.response mandatory for batch-response/transaction-response/history, otherwise prohibited Test=not(f:entry/f:response) or (f:type/@value = 'batch-response') or (f:type/@value = 'transaction-response') or (f:type/@value = 'history')</pre></td>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t</tr>\n\t\t</table>\n\t</div>" }, "issue": [ { "severity": "error", "code": "processing", "diagnostics": "[error] in /*:Bundle[namespace-uri()='http://hl7.org/fhir'][1] @ Bundle bdl-4: entry.response mandatory for batch-response/transaction-response/history, otherwise prohibited Test=not(f:entry/f:response) or (f:type/@value = 'batch-response') or (f:type/@value = 'transaction-response') or (f:type/@value = 'history')", "location": [ "Bundle" ] } ] }
That looks like HAPI server automatically adds entry.response field and seems you've mentioned that in the changelog for 3.6.0 Release:
"When operating in R4 mode, the HAPI FHIR server will now populate Bundle.entry.response for history and search results, which is did not previously do."
So technically there are contradtiction with the specification. What is your advice to deal with that?
Last updated: Apr 12 2022 at 19:14 UTC