FHIR Chat · versioned references in _include/_has · implementers

Stream: implementers

Topic: versioned references in _include/_has


view this post on Zulip Chris Grenz (Oct 05 2016 at 02:32):

If a reference is version specific (think AuditEvent.entity.reference) and an _include or _has is used, should the included resources be the version specific ones or the current ones? At first, I thought this obvious (version specific), but not so sure. Today, I needed to find:
Encounter?_has:AuditEvent:reference:action-by=update$my-user-id&_profile=http://example.com/sd/something
(action-by is a composite of subtype + altid)
Since search parameters only apply to the current version, the _profile search applies to current, but the AuditEvent.reference applies to an old version. My intent was "an Encounter that was ever updated by my-user-id and (currently) has this profile".

view this post on Zulip Grahame Grieve (Oct 05 2016 at 02:33):

not obvious at all then

view this post on Zulip Chris Grenz (Oct 05 2016 at 02:34):

Having a hard time getting my head around this...thinking maybe there should be a modifier on reference searches to direct resolution

view this post on Zulip Chris Grenz (Oct 05 2016 at 02:42):

@James Agnew @Ewout Kramer @Richard Ettema How do your servers handle this?

view this post on Zulip Chris Grenz (Oct 05 2016 at 02:44):

Could be as simple as Encounter?patient.name=donovan when the Encounter has a version specific patient reference and the patient has been updated. The search indexes usually don't have the old version of the patient...then what?

view this post on Zulip James Agnew (Oct 07 2016 at 02:30):

This is an interesting question..

I implemented _has in a non-version-specific way. Now that I think about it, so is _include. Both features assume the latest version even if the reference is to an older version.

view this post on Zulip Lloyd McKenzie (Oct 07 2016 at 04:13):

If a reference is version-specific, you really want an _include to be the specified version. I'm not as sure about _has

view this post on Zulip Chris Grenz (Oct 10 2016 at 20:07):

What about a chained search?

view this post on Zulip Lloyd McKenzie (Oct 10 2016 at 22:35):

That would still follow version-specific references if they were version specific, I presume

view this post on Zulip Chris Grenz (Oct 10 2016 at 22:56):

Meaning search on old versions. Ouch. Of course, servers could opt-out, but now we're in a situation where chained search *is* supported, but a particular instance may not be. Similar to a broken link/reference, but not quite since a current version of the record may still exist. This is all kinds of fuzzy....

view this post on Zulip Grahame Grieve (Oct 10 2016 at 23:22):

interesting question. I don't follow version specific references in search; all search is on current resources

view this post on Zulip Brian Postlethwaite (Oct 11 2016 at 02:08):

I think with the chained search I would be ok if the deleted content was not indexed, and that the link for chaining was not considered to be the versioned item.

view this post on Zulip Lloyd McKenzie (Oct 14 2016 at 03:44):

If I search a Provanance and ask to get back its target too, I definitely don't want the current version

view this post on Zulip Anand Mohan Tumuluri (Oct 19 2016 at 20:30):

Are there any servers out there that follow version specific references in (chained) search? Is this a mandatory requirement?
Contrary use case: Get all audit events for the patient with the MRN currently as 12345 -
/AuditEvent?participant:Patient.identifier=http://acmehospital.com/Downtown|12345.
I want to get all audit events of the patient even though this patient was previously wrongly assigned a different MRN?

view this post on Zulip Grahame Grieve (Oct 19 2016 at 20:30):

my server does not consider the version

view this post on Zulip Grahame Grieve (Oct 19 2016 at 20:31):

it's not a mandatory requirement


Last updated: Apr 12 2022 at 19:14 UTC