Stream: implementers
Topic: OperationOutcome when using "_include"
Mona O (Jul 03 2019 at 21:34):
How does operationOutcome work when performing a search and utilizing "_include"?
Example: When performing a search for explanation of benefit by a patient's identifier and the search is to include Practitioner and an error occurred with the practitioner resource. How would the practitioner reference error be represented in the bundle?
Would the operationOutcome resource be returned as an entry along with the entry of the explanation of benefit, since the explanation of benefit was successful? If so, how would we denote that the operationOutcome was just for the Practitioner resource only?
Andy Stechishin (Jul 03 2019 at 22:08):
Is the error that you don't have the Practitioner to include? Or that some sort of server error occurred during the retrieval internally of the Practitioner?
Lloyd McKenzie (Jul 03 2019 at 22:26):
Possibility 1 is that the error causes the entire query to fail, in which case you don't get a Bundle back at all - just an OperationOutcome. The OperationOutcome might describe that the issue was with executing the _include and diagnostic information might even let you figure out which practitioner record caused the problem. Alternatively, you could treat the query as a success and return results, possibly even including some of the Practitioner resources. You could then include an OperationOutcome as one of the entries with a 'warning' indicating that one/some of the Practitioners weren't retrieved and why.
Mona O (Jul 03 2019 at 22:40):
The situation I was thinking of is explanation of benefit was successful, but the practitioner resource had a server error. I wanted to confirm that I should still return the explanation of benefit resource as entry, but would the operationOutcome resource be returned as an entry to represent the practitioner resource had a server error (unsure where to explicitly call out the practitioner resourced had an error within the operationOutcome resource) or if the practitioner resource should still be an entry.
Lloyd McKenzie (Jul 03 2019 at 22:47):
There isn't really a "should". You can choose to error out. You can choose to return what you can with a warning. Which is appropriate depends on what you think is safest and most appropriate for the client
Mona O (Jul 30 2019 at 03:57):
@Lloyd McKenzie How is an OperationOutcome associated back to a specific reference? In the original example an ExplanationOfBenefit search is requested by identifier. If "practitioner/123" is referenced in EOB, but due to server error retrieval of practitioner "123" could not be performed to include the practitioner resource within the bundle. How should the OperationOutcome be represented to indicate the entry is specifically for the reference "practitioner/123"?
Lloyd McKenzie (Jul 30 2019 at 04:09):
Is this an error in the execution of the search - so doing a query against EOB and an _include on EOB.care-team or something and some practitioners come back but this one doesn't? It wouldn't be reflected in issue.expression - the best that could do is point to the _include parameter. The details about the specific reference that failed would have to be in the text of issue.detail. (If you want to share that information discretely for some reason, I guess you could define an extension.)
Mona O (Jul 30 2019 at 04:28):
Thank you @Lloyd McKenzie , you have the scenario correct. Would most implementers not include an OperationOutcome for the missing practitioner entry? Would we be adding confusion by including an OperationOutcome in this scenario? The thought for including the OperationOutcome in this situation is to inform the consumer that the practitioner information couldn't be included at this time (issue.severity would be "information" ).
Lloyd McKenzie (Jul 30 2019 at 04:35):
In most cases, typical response would be for the overall query to be successful but to include an OperationOutcome as part of the bundle with a warning message. (Warning is probably more appropriate than 'information' because the information returned isn't "complete". Information would be more like "here are the places I checked")
Last updated: Apr 12 2022 at 19:14 UTC