FHIR Chat · cqf-expressions questions · questionnaire

Stream: questionnaire

Topic: cqf-expressions questions


view this post on Zulip Rob Dingwell (Aug 04 2020 at 19:26):

Sorry if this has been discussed before but I couldn't find anything in relation to some of these questions.

From what I've seen the cqf-expressions extension is always at the item level. At first blush this seems like a natural place for it to be but looking at it a bit further it also seems odd. cqf-expression defines itself as providing the value for the element on which it appears but in this case it seems like it is being used to define the value for an element on a separate resource, QuestionnaireResponse. Curious as to why the cqf-expression would not be used on Questionnaire.item.initialValue and Questionnaire.item.answerOption?

Is there somewhere that defines the use and expectations of cqf-expression on Questionnaire.item? Is the expression only used to gather to answer(s) to the item? If it's the item is of type choice or open choice is the expression also considered to be the answerOption[x] list? Is the expression expected to be the value for initalValue[x].

If the expression is not expected to represent the answerOption[x] list for choice and open-choice questions then I see the issue where someone accidentally removes a CQL derived value in a Questionnaire without a means to add it back in.

view this post on Zulip Lloyd McKenzie (Aug 04 2020 at 20:35):

cqf-expression is probably not what you want - take a look at the structured data capture IG (http://build.fhir.org/ig/HL7/sdc/) and look at the section on 'population'. There are a number of Questionnaire-specific extensions that handle the semantic of 'appearing on Questionnaire, but intended to define values for use in the resulting QuestionnaireResponse'.

view this post on Zulip Rob Dingwell (Aug 04 2020 at 20:47):

Thanks @Lloyd McKenzie At the risk of making work for the DaVinci project, all of their examples, as far as I can tell, use cqf-expression. I take it that those examples would more appropriately use the extensions defined under SDC. @Yunwei Wang is there any intent on moving to the SDC extensions as they seem more appropriate.

view this post on Zulip Rob Dingwell (Aug 05 2020 at 11:28):

Nevermind, I see DaVinci is using the guidance from here http://hl7.org/fhir/R4/clinicalreasoning-knowledge-artifact-representation.html#documentation-template

I also see that SDC is a viable alternative defined within the DaVinci documentation.

I suppose that begs the initial questions I had regarding the use of cqf-expression in the manner described in the clinical reasoning module.

view this post on Zulip Bryn Rhodes (Aug 05 2020 at 13:25):

The Clinical Reasoning documentation template approach uses cqf-expression because that was the intended extension to support that sort of capability, but the SDC approach is much more mature, and the cqf-questionnaire profile has been deprecated. The cqf-expression extension is still used to provide "the value of the element on which it appears", in particular we use that for describing dynamic test data (example).

view this post on Zulip Paul Lynch (Aug 05 2020 at 13:32):

Also, SDC uses cqf-expression for a few things, per this tracker item: https://jira.hl7.org/browse/FHIR-25960

view this post on Zulip Rob Dingwell (Aug 05 2020 at 13:52):

@Bryn Rhodes thanks, that makes sense, but I am not seeing the cqf-questionnaire profile as being labeled as deprecated. In the latest R5 build it is still listed for 'Trial Use'. Is it supposed to be labeled as deprecated?

view this post on Zulip Yunwei Wang (Aug 05 2020 at 13:52):

"cqf-questionnaire profile has been deprecated" Really? Wow. What is replacement for that profile?

view this post on Zulip Yunwei Wang (Aug 05 2020 at 14:43):

@Rob Dingwell After brief reading, I think answerExpression extension mentioned in https://jira.hl7.org/browse/FHIR-25960 could be a direction to go. Or the combination of questionnaire-initialExpression, sdc-questionnaire-candidateExpression, and sdc-questionnaire-contextExpression could also be a good replacement.

view this post on Zulip Yunwei Wang (Aug 05 2020 at 14:46):

A question about questionnaire-initialExpression. Expression-based Population states that "This should always be a FHIRPath that resolves to an item of the appropriate type unless the element has a type of Reference, in which case the expression can be a FHIR query". Why is CQL expression excluded here?

view this post on Zulip Rob Dingwell (Aug 05 2020 at 15:01):

@Yunwei Wang I think that CQL was inadvertently left out of that portion of the documentation. If you look here you will see that CQL is listed as well . http://build.fhir.org/ig/HL7/sdc/expressions.html

view this post on Zulip Yunwei Wang (Aug 05 2020 at 15:32):

In general. yes. That is why I am confused by the wording "should always be a FHIRPath". Maybe there is a specific reason to exclude CQL. If so, I would like that to be clarified.

view this post on Zulip Yunwei Wang (Aug 05 2020 at 17:55):

https://jira.hl7.org/browse/FHIR-28211

view this post on Zulip Lloyd McKenzie (Aug 05 2020 at 22:18):

There was a change request for us to allow CQL in places that had previously only allowed FHIRPath. It's possible that either hasn't been applied yet or this spot might have been missed. @Joee Garcia ?

view this post on Zulip Joee Garcia (Aug 06 2020 at 10:41):

@Lloyd McKenzie @Yunwei Wang Yes, this same spot in the documentation has been raised and resolved in https://jira.hl7.org/browse/FHIR-21391 , but it has not been applied yet.


Last updated: Apr 12 2022 at 19:14 UTC