FHIR Chat · Questionnaire-related FHIRPath tools · fhirpath

Stream: fhirpath

Topic: Questionnaire-related FHIRPath tools


view this post on Zulip Lloyd McKenzie (Jan 31 2019 at 23:10):

There are 3 things that would be useful to have available in FHIRPath when working with QuestionnaireResponses. One is a %questionnaire context element that points to the questionnaire for the current response. The second is a question(), item(), qitem() or whatever you'd like to call it function (similar to the 'extension' function) that will give you the Questionnaire.item for the specified linkId. The last is a function to give you the ordinalValue associated with a particular answer - which might involve grabbing it from the Questionnaire.item.option, but could also involve resolving the value set and grabbing it from the associated code.

view this post on Zulip Grahame Grieve (Jan 31 2019 at 23:13):

the last we already defined back at the informal in Boston, and is in my blog, yes?

view this post on Zulip Lloyd McKenzie (Jan 31 2019 at 23:14):

Not that I recall reading or talking about, no...

view this post on Zulip Grahame Grieve (Jan 31 2019 at 23:16):

yes:

We define 3 FHIRPath short cuts to simplify the expressions:

  • answers() – a flattened collection of all the answers in a response
  • ordinal() – given the focus of an answer (QuestionnaireResponse.item.answer.valueCoding), look up the ordinal value where ever it is defined
  • sum(expression) – a shortcut for aggregate($this + expression, 0)

view this post on Zulip Paul Lynch (Jan 31 2019 at 23:16):

Where would those actually live? The FHIR part of the FHIRPath spec?

view this post on Zulip Grahame Grieve (Jan 31 2019 at 23:16):

long term, probably this page:

view this post on Zulip Grahame Grieve (Jan 31 2019 at 23:17):

http://hl7.org/fhir/fhirpath.html

view this post on Zulip Grahame Grieve (Jan 31 2019 at 23:17):

but for now, the SDC spec

view this post on Zulip Lloyd McKenzie (Jan 31 2019 at 23:17):

ordnal would need to support non-coding values too. integers and dates can also have ordinals

view this post on Zulip Paul Lynch (Jan 31 2019 at 23:18):

If they are in the SDC spec, only fhirpath.js will implement them. :-)

view this post on Zulip Grahame Grieve (Jan 31 2019 at 23:18):

I at least will. which means HAPI will. and the DotNet FHIRPath engine ha an extensibility framework for stuff like this

view this post on Zulip Brian Postlethwaite (Feb 02 2019 at 11:16):

Which I will implement for sure.


Last updated: Apr 12 2022 at 19:14 UTC