Stream: questionnaire
Topic: questionnaire-launchContext
Paul Lynch (Nov 06 2018 at 01:35):
@Lloyd McKenzie I have a question about the newly renamed questionnaire-launchContext (GF#19500) which I am now trying to implement. The extension provides a "name" and a "type". The "name" I think I am free to choose and becomes the name of a variable accessible to FHIRPath in the Questionnaire. The "type" is supposed to be a ResourceType, and in the resolution to that tracker, I can now specify more than one type. What exactly does it mean to request more than one type? If I set "name" to "artichoke", and "type" to ["Patient", "Practitioner", "Location"], which resource will be placed into %artichoke? All of them?
Lloyd McKenzie (Nov 06 2018 at 01:36):
One of them. For example, you might support the "user" context being a Patient, Practitioner or RelatedPerson - the actual user would be one of those.
Paul Lynch (Nov 06 2018 at 01:37):
So the "type" list must be within the same context?
Lloyd McKenzie (Nov 06 2018 at 01:46):
The type list reflects the allowed types for that context variable
Paul Lynch (Nov 06 2018 at 02:11):
Maybe what I wrote above it not quite right then. Are the values of "name" constrained to "user", "patient", etc.? I thought I was free to chose my own name for the variable.
If I can choose my own variable name, then I don't see what these "context" names have to do with anything. I choose a variable name and a list of types I am interested in working with via that variable.
Lloyd McKenzie (Nov 06 2018 at 02:58):
There are certain special pre-defined names everyone is expected to use consistently. However, you're free to define your own too.
Brian Postlethwaite (Nov 06 2018 at 03:23):
I would have liked the Smart on FHIR context variables to also flow in.
Lloyd McKenzie (Nov 06 2018 at 03:42):
I would expect a SMART app that invokes the $populate or other operations that need the context variables to do exactly that.
Brian Postlethwaite (Nov 06 2018 at 05:06):
I had a thought that this part is almost walking into the pre-fetch style stuff from CDS-Hooks
(I must think about this some more)
Paul Lynch (Nov 06 2018 at 15:09):
@Brian Postlethwaite What other "context variables"? I am looking at the JavaScript client (http://docs.smarthealthit.org/clients/javascript/) and there is smart.patient and smart.user (which must be requested asyncronously), plus a FHIR client API object, and that seems to be all.
Brian Postlethwaite (Nov 06 2018 at 15:41):
You are correct for the smart on fhir part, I was c referring to CDS hooks, where the hook registers the information it needs.
Last updated: Apr 12 2022 at 19:14 UTC