Stream: implementers
Topic: error state in a contained resource
 Erich Schulz (Jun 06 2016 at 12:43):
 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?
 Erich Schulz (Jun 06 2016 at 12:45):
 Erich Schulz (Jun 06 2016 at 12:45):
"temporarily unavailable", "server error", "server unreachable" etc
 Grahame Grieve (Jun 06 2016 at 13:26):
 Grahame Grieve (Jun 06 2016 at 13:26):
check dataAbsentReason extension: http://hl7-fhir.github.io/extension-data-absent-reason.html
 Erich Schulz (Jun 07 2016 at 08:15):
 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?
 Erich Schulz (Jun 07 2016 at 08:18):
 Erich Schulz (Jun 07 2016 at 08:18):
actually I think I just need to RTM
 Erich Schulz (Jun 07 2016 at 11:27):
 Erich Schulz (Jun 07 2016 at 11:27):
umm...
 Erich Schulz (Jun 07 2016 at 11:27):
 Erich Schulz (Jun 07 2016 at 11:27):
so just to confirm... does this look legit:
 Erich Schulz (Jun 07 2016 at 11:27):
 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}]};
 Erich Schulz (Jun 07 2016 at 11:29):
 Erich Schulz (Jun 07 2016 at 11:29):
where that returned value just drops into the missing value?
 Grahame Grieve (Jun 07 2016 at 12:26):
 Grahame Grieve (Jun 07 2016 at 12:26):
is that JSON? doesn't look right to me
 Erich Schulz (Jun 07 2016 at 12:29):
 Erich Schulz (Jun 07 2016 at 12:29):
It's javascript. So properties don't require quotes. Otherwise it's json.
 Grahame Grieve (Jun 07 2016 at 12:42):
 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
 
                