FHIR Chat · Prefetch Questions · cds hooks

Stream: cds hooks

Topic: Prefetch Questions


view this post on Zulip Kevin Price (Dec 10 2020 at 15:33):

Hello Everyone. I am looking for a little help to understand some of the Prefetch requirements for CDS Hooks. We are experimenting with leveraging CDS Hooks to communicate cards for PDMP information in workflow. Most state PDMP require information like the Practitioner, Organization information, Practitioner Role, etc and authorize access to the PDMP. I was looking to pull this information via prefetch but I am unable to find references in the wild outside of things like patients, and medications, etc. So for an example like 'Patient/{{context.patientId}}' would pulling Practitioner for an encounter and PractitionerRole be something like 'Practitioner?<encounterId>='. Any help or references to more advance examples is much appreciated. Thanks!

view this post on Zulip Kevin Price (Dec 10 2020 at 15:52):

I am leaning towards trying something like Organization?encounter={{context.encounterId}} and "user": "{{context.userId}}" for Practitioner. Then PractitionerRole?practitioner="{{context.userId}}" - but was curious if anyone else had experience of grabbing information like this based on an encounter.

view this post on Zulip Matt Varghese (Dec 16 2020 at 21:06):

context.userId can be a PractitionerRole ID or a Practitioner ID. So if you do {"user": "{{context.userId}}"} you'll have to examine the resource to see if it is a Practitioner or a PractitionerRole.


Last updated: Apr 12 2022 at 19:14 UTC