FHIR Chat · Extension holding array of integers · questionnaire

Stream: questionnaire

Topic: Extension holding array of integers


view this post on Zulip Nagarjuna Pechetti (Apr 06 2021 at 13:14):

How we can maintain an array of integers in a fhir extension of R4 version?

view this post on Zulip Lloyd McKenzie (Apr 06 2021 at 16:23):

You can't - in any version of FHIR. If you want an array of integers, you'll have an array of extensions, each having a single integer value.

view this post on Zulip Lloyd McKenzie (Apr 06 2021 at 16:23):

What is your use-case?

view this post on Zulip Nagarjuna Pechetti (Apr 06 2021 at 17:09):

Thanks for the Reply @Lloyd McKenzie. My use-case is: I Have score for every answer option of type multiple answer question like Check-box in Questionnaire resource. Now for the answer options I want to perform operations like Average of scores or Max/Min score of all the answers using Aggregates (http://hl7.org/fhirpath/#aggregates). I was able to write the valueExpression Extension to get the score individually, but not in a single extension to perform Aggregation.

Is there any way that I can perform Aggregation when they are in separate Extension?

view this post on Zulip Lloyd McKenzie (Apr 06 2021 at 18:37):

If you have a score per answer, that sounds like you should be capturing an ordinalValue for each coded answer (there's a standard extension for that). FHIRPath should be able to aggregate across all of the ordinalValue values

view this post on Zulip Lloyd McKenzie (Apr 06 2021 at 18:37):

Aggregations simply operate against whatever's in the collection - and the collection is whatever's reachable with the path.


Last updated: Apr 12 2022 at 19:14 UTC