Stream: fhirpath
Topic: Questionnaire-related FHIRPath tools
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.
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?
Lloyd McKenzie (Jan 31 2019 at 23:14):
Not that I recall reading or talking about, no...
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)
Paul Lynch (Jan 31 2019 at 23:16):
Where would those actually live? The FHIR part of the FHIRPath spec?
Grahame Grieve (Jan 31 2019 at 23:16):
long term, probably this page:
Grahame Grieve (Jan 31 2019 at 23:17):
http://hl7.org/fhir/fhirpath.html
Grahame Grieve (Jan 31 2019 at 23:17):
but for now, the SDC spec
Lloyd McKenzie (Jan 31 2019 at 23:17):
ordnal would need to support non-coding values too. integers and dates can also have ordinals
Paul Lynch (Jan 31 2019 at 23:18):
If they are in the SDC spec, only fhirpath.js will implement them. :-)
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
Brian Postlethwaite (Feb 02 2019 at 11:16):
Which I will implement for sure.
Last updated: Apr 12 2022 at 19:14 UTC