FHIR Chat · Which contexts are supported · cql

Stream: cql

Topic: Which contexts are supported


view this post on Zulip Richard Stanley (Jul 15 2021 at 13:36):

I'm curious which contexts are supported beyond Patient. The use case is processing using the Location context and Questionnaire Response resources that are linked, such as from facility readiness surveys.

view this post on Zulip Bryn Rhodes (Jul 15 2021 at 14:37):

The ModelInfo currently creates contexts for each CompartmentDefinition in the base specification, so that results in Patient, Encounter, RelatedPerson, Practitioner, and Device. Some implementations have added custom support for contexts beyond that, and of course it would be straightforward to add context declarations for anything we wanted, we just have to define for each context how it relates to the resources in the model.

view this post on Zulip Bryn Rhodes (Jul 15 2021 at 14:39):

I've added https://github.com/cqframework/cqf-tooling/issues/264 to add Location

view this post on Zulip Bryn Rhodes (Jul 15 2021 at 14:39):

It would help to identify all the relationships that need to be supported there.

view this post on Zulip Richard Stanley (Jul 15 2021 at 20:12):

Does this apply to the Questionnaire Response as a context as well?

view this post on Zulip Richard Stanley (Jul 15 2021 at 20:14):

Though, I suppose it would make more sense to approach a QR resource with SDC...

view this post on Zulip Chris Moesel (Jul 20 2021 at 16:57):

Note that support in the model is different than support in the translator is different than support in an execution environment. The JavaScript cql-execution library only supports Patient and Unfiltered contexts (and even support for Unfiltered is limited). I'm not sure about the Java execution library (but @Bryn Rhodes would know).

view this post on Zulip Bryn Rhodes (Jul 20 2021 at 17:18):

The translator drives off the model info, so should support any contexts that are defined by a particular model, so should be okay there (might hit edge cases, it's not well-used functionality there yet). And yes, definitely the engines will need to support contexts, and right now the Patient context is the only one that is supported in the Java engine.


Last updated: Apr 12 2022 at 19:14 UTC