FHIR Chat · Returning Provenance with resource · implementers

Stream: implementers

Topic: Returning Provenance with resource


view this post on Zulip Calum Turner (Mar 23 2021 at 15:27):

Hello all, I am looking to understand how Provenance resources should be returned with the target resource. I would like to return related provenance when an instance history request is made (ie for immunizations), is that possible?

I understand with Search you can use _revinclude does that exists for history?
Thanks!

view this post on Zulip Lloyd McKenzie (Mar 23 2021 at 15:32):

We haven't defined support for _revinclude for the history operation. You could submit a change request suggesting that we add it - for this specific use-case.

view this post on Zulip Calum Turner (Mar 23 2021 at 15:42):

@Lloyd McKenzie so is the expected behaviour for a rest API that an application calls the history for an instance, then makes another call to search for related Provenances?

view this post on Zulip Lloyd McKenzie (Mar 23 2021 at 16:14):

At the moment, yes.

view this post on Zulip Calum Turner (Mar 23 2021 at 16:17):

Thanks!

view this post on Zulip Brian Wright (Mar 23 2021 at 17:17):

On a related note, we have observed that if your provenance target reference includes the instance version, most servers will not include the provenance when searching the base resource and using _revinclude=Provenance:target. In our specific use case we search by identifier and are only interested in the provenance for the current version of the base resource. Our workaround is to have the provenance point to the base resource (without version info), use _revinclude=Provenance:target in our search, and then apply additional client logic to determine the provenance(s) relevant to the latest version of the resource.

view this post on Zulip John Moehrke (Mar 23 2021 at 17:41):

Brian, my understanding is that _revinclude will return all Provenance that point at the resource, regardless of if the Provenance.target was version specific or not. Is that what you are describing?

view this post on Zulip Brian Wright (Mar 23 2021 at 22:48):

Although the US Core Provenance Target comments state that "Target references are usually version specific", and US Core states that retrieval of resources and associated provenance SHALL be supported using _revinclude=Provenance:target, in our testing, support for returning version specific provenance with _revinclude is not widely supported by servers.

view this post on Zulip Paul Church (Mar 24 2021 at 14:36):

Oh that's interesting, I don't think we ever considered that in our implementation. That might be fixable.

view this post on Zulip Doug Pratt (Mar 26 2021 at 20:02):

Should Bundle.entry.search.mode for included Provenance resources due to "_revinclude" have the value "match"? The spec is not clear if "_revinclude" should be treated same as "_include" or not. Since the user is not really "searching" for Provenance in this case, is "match" is the appropriate choice?

view this post on Zulip Michele Mottini (Mar 26 2021 at 20:05):

No, it should be 'include'

view this post on Zulip Doug Pratt (Mar 26 2021 at 20:11):

Thanks Michele. We weren't sure how to interpret .mode for revinclude.

view this post on Zulip Lloyd McKenzie (Mar 26 2021 at 20:42):

If you think clarification is needed in the spec, feel free to submit a change request


Last updated: Apr 12 2022 at 19:14 UTC