FHIR Chat · Operation Response with 0 Health Cards · smart/health-cards

Stream: smart/health-cards

Topic: Operation Response with 0 Health Cards


view this post on Zulip Pascal Pfiffner (Jul 16 2021 at 18:09):

We're not specifying what the FHIR API response should be if a patient doesn't have SHCs, I just opened https://github.com/smart-on-fhir/health-cards/issues/163.

I also haven't seen guidance in the FHIR spec about what to do (or haven't found it). I believe two good options are:

  • Return a 200 with a Parameters resource that just has resourceType populated, because it's empty
  • Return a 204 and no response body

What do we think?

view this post on Zulip Josh Mandel (Jul 16 2021 at 19:46):

I'd lead toward the 200 with a Parameters resource (and no actual named params inside because ... there are zero). I like this by analogy to a FHIR Search, which returns a Bundle with 0 entries when the search matches no resources.

view this post on Zulip Josh Mandel (Jul 16 2021 at 19:47):

(And in the future if we want to attach additional response properties like "timeUntilNextHealthCardIsAvailable" or whatever, we don't need to rework the response status codes / semantics.)

view this post on Zulip Michael Turman (Jul 16 2021 at 20:34):

Option 1 is what we are doing today - I vote option 1.

view this post on Zulip Michael Turman (Jul 16 2021 at 20:34):

double entry doh

view this post on Zulip Pascal Pfiffner (Jul 16 2021 at 22:41):

PR is here, I'm gonna wait a bit so folks have a chance to weigh in:
https://github.com/smart-on-fhir/health-cards/pull/164


Last updated: Apr 12 2022 at 19:14 UTC