FHIR Chat · error state in a contained resource · implementers

Stream: implementers

Topic: error state in a contained resource


view this post on Zulip Erich Schulz (Jun 06 2016 at 12:43):

I am just wondering... if I'm doing some lookups to build a resource in disparate systems and some fail, and presuming I still want to return as much as I can, is there a pattern for indicating some of the sub-resources errored out?

view this post on Zulip Erich Schulz (Jun 06 2016 at 12:45):

"temporarily unavailable", "server error", "server unreachable" etc

view this post on Zulip Grahame Grieve (Jun 06 2016 at 13:26):

check dataAbsentReason extension: http://hl7-fhir.github.io/extension-data-absent-reason.html

view this post on Zulip Erich Schulz (Jun 07 2016 at 08:15):

thanks @Grahame Grieve ! I think I can imagine how that looks in a base resource. Are there any examples of how it looks in contained resource?

view this post on Zulip Erich Schulz (Jun 07 2016 at 08:18):

actually I think I just need to RTM

view this post on Zulip Erich Schulz (Jun 07 2016 at 11:27):

umm...

view this post on Zulip Erich Schulz (Jun 07 2016 at 11:27):

so just to confirm... does this look legit:

view this post on Zulip Erich Schulz (Jun 07 2016 at 11:27):

return { extension: [{ url : "http://hl7.org/fhir/StructureDefinition/data-absent-reason", valueCode: "error" , error: 'failed ' + params.task}]};

view this post on Zulip Erich Schulz (Jun 07 2016 at 11:29):

where that returned value just drops into the missing value?

view this post on Zulip Grahame Grieve (Jun 07 2016 at 12:26):

is that JSON? doesn't look right to me

view this post on Zulip Erich Schulz (Jun 07 2016 at 12:29):

It's javascript. So properties don't require quotes. Otherwise it's json.

view this post on Zulip Grahame Grieve (Jun 07 2016 at 12:42):

ok. I understand the return bit now, but not this: valueCode: "error" ,
error: 'failed ' + params.task}]};


Last updated: Apr 12 2022 at 19:14 UTC