Stream: implementers
Topic: Reference all instances
Matthew Mosier (Feb 25 2021 at 14:08):
GM
I am working with the Consent resource and I am wondering if there is a way to reference all instances of a resource in Consent.provision.data. In the case that a patient wants to share all Encounters with their practitioner, how would one use the Consent.provision.data object to reference all instances of that type? Is it as simple as {"Reference": { "type": "Encounter" } } ?
David Pyke (Feb 25 2021 at 14:59):
That would do it, yes. But you may want to set data.meaning to related to allow for information about those encounters (such as diagnoses and other directly linked resources) to also be allowed
Matthew Mosier (Feb 26 2021 at 17:18):
So after doing this, I am falling short on a related issue.
When using Consent.provision.data[0].reference = {"type": "Patient"}, how can I search for this?
I have tried using <baseURL>Consent?data=Patient, but that does not resolve.
Basically, how do I search for reference.type in my request?
Paul Church (Feb 26 2021 at 17:21):
I think we had a very similar discussion in a thread a while ago: https://chat.fhir.org/#narrow/stream/179166-implementers/topic/search.20on.20type.20reference.20in.20STU3
Matthew Mosier (Feb 26 2021 at 17:24):
Does this apply to R4 too?
Paul Church (Feb 26 2021 at 17:26):
yes, I don't think there are any R4 changes that make any difference to this use case
Yunwei Wang (Feb 26 2021 at 18:43):
Strangely, neither http://hapi.fhir.org/baseDstu3/metadata nor http://hapi.fhir.org/baseR4/metadata indicate it supports _type
search parameter.
Lloyd McKenzie (Feb 26 2021 at 18:45):
@James Agnew
Last updated: Apr 12 2022 at 19:14 UTC