FHIR Chat · OperationOutcome for a write · implementers

Stream: implementers

Topic: OperationOutcome for a write


view this post on Zulip Rik Smithies (Sep 03 2018 at 10:26):

Is it permissible to return an OperationOutcome on a successful write (POST, PUT etc) that gives back information about e.g. a warning about the data being incomplete in some business sense (though acceptable in persistence sense). Use case is to save a partially complete record - return to edit later - and give advice on what needs to be filled in.

view this post on Zulip Vadim Peretokin (Sep 03 2018 at 10:37):

Yep, just set the severity appropriately

view this post on Zulip Rik Smithies (Sep 03 2018 at 10:40):

thanks Vadim

view this post on Zulip Lloyd McKenzie (Sep 03 2018 at 15:58):

You can use the Prefer header to indicate that you want return=OperationOutcome

view this post on Zulip Jenni Syed (Sep 04 2018 at 13:23):

I believe you can only return the OperationOutcome on POST or PUT if the caller specifically requested it: http://hl7.org/fhir/stu3/http.html#2.21.0.5.2

view this post on Zulip Jenni Syed (Sep 04 2018 at 13:24):

"In the absence of the header, servers may choose whether to return the full resource or not (but not the OperationOutcome; that should only be returned if explicitly requested)."

view this post on Zulip Ken Sinn (Feb 11 2020 at 02:31):

Resurrecting an old thread.
Based on the conformance language on http://hl7.org/fhir/http.html#ops, in a successful interaction (i.e. a Create), the OperationOutcome should not be returned in response unless explicitly requested. Does it break conformance rules if we return an OperationOutcome, since the language is "should" and not "shall"?

edit: Cross-referencing Lloyd's response https://chat.fhir.org/#narrow/stream/179166-implementers/topic/Response.20to.20Create.20Interaction/near/177676515

In the end, the server can choose what to return - be that just the headers, or headers + OperationOutcome (if warnings) or headers + content.

Wondering if returning the OperationOutcome (if all informational) is breaking anything as well.

view this post on Zulip Lloyd McKenzie (Feb 11 2020 at 18:15):

It's a SHOULD - so you're allowed to return an OperationOutcome even if it hasn't been asked for.


Last updated: Apr 12 2022 at 19:14 UTC