FHIR Chat · Guidance around dependencies on external sources · questionnaire

Stream: questionnaire

Topic: Guidance around dependencies on external sources


view this post on Zulip Lloyd McKenzie (Apr 07 2022 at 23:37):

Questionnaires can depend on external value sets, the results of queries, passed in launch parameters, and resolving references. Depending how they're used, the end result can be that someone looking at or validating the QuestionnaireResponse later may see different information or even have validation issues that the original author did not.

FHIR#36338 proposes adding some guidance about strategies to minimize/reduce this issue, but it seems unlikely/impractical to eliminate it entirely. It also raises the question of in what circumstances a calculatedValueExpression should actually be calculated. Should it only happen if the QuestionnaireResponse is not yet completed? What if it gets amended? Are there situations where it's appropriate to adjust the display based on the 'current' context - e.g. showing duration based on the 'now' of the current viewer?

Perhaps it's an unreasonable expectation that a QuestionnaireResponse that was valid when transitioned to 'complete' will always remain valid (as expansions of valuesets, retrieved search results, referenced resources, and/or launch parameters change)?

This thread is for people to discuss their expectations around validity as well as when 'dynamic' elements in a form should cease being 'dynamic'.

view this post on Zulip Brian Postlethwaite (Apr 08 2022 at 00:13):

And another interesting result question would be if the result of the fhirpath expression today() should resolve to the value of the response... (meta.lastModified or QR.date) - it's fine when it was originally saved, but then on edits later on.
(considering examples like an invariant where it checks that a review date is in the future, and you make an edit to the result later on)

view this post on Zulip Lloyd McKenzie (Apr 08 2022 at 02:42):

today() is always going to resolve to today. That's not going to change. If you need a snapshot of a 'specific' today(), you need to store it in the QR.

view this post on Zulip Brian Postlethwaite (Apr 08 2022 at 04:00):

That's going to be fun...

view this post on Zulip Brian Postlethwaite (Apr 08 2022 at 04:02):

A better thing would be a way to check the date in the QR.
I guess can try this out.

view this post on Zulip Brian Postlethwaite (Apr 08 2022 at 04:10):

I guess I could use this as the invariant/constraint expression
(%resource.authored | today()).take(1)

view this post on Zulip Paul Lynch (Apr 08 2022 at 17:46):

Lloyd McKenzie said:

Perhaps it's an unreasonable expectation that a QuestionnaireResponse that was valid when transitioned to 'complete' will always remain valid

I think that given that external dependencies can change or disappear, we can only require a QuestionnaireResponse to be valid at the time it was marked complete.

view this post on Zulip Paul Lynch (Apr 08 2022 at 17:52):

Even that scenario could cause issues if a user filling out a form takes several days to do so, and something changes so that an answer picked from a list a few days earlier is no longer valid. I guess is such situations the application might allow the user to "finish" the Questionnaire without it being marked completed.


Last updated: Apr 12 2022 at 19:14 UTC