FHIR Chat · Summing a collection? · fhirpath

Stream: fhirpath

Topic: Summing a collection?


view this post on Zulip Paul Lynch (Aug 09 2018 at 22:35):

If I have a collection of numbers, is there a way to sum them?

view this post on Zulip Grahame Grieve (Aug 09 2018 at 23:45):

using the aggregator. And note that we defined sum() in the questionnaire stuff as an extension - see http://www.healthintersections.com.au/?p=2835

view this post on Zulip Paul Lynch (Aug 10 2018 at 15:10):

I saw a mention of an "aggregator" but I could not find anything about it in the FHIRPath spec at http://hl7.org/fhirpath/. Is it someplace else?

view this post on Zulip nicola (RIO/SS) (Aug 10 2018 at 16:12):

i think, we have to use github version!?

view this post on Zulip Paul Lynch (Aug 10 2018 at 17:14):

I found it here: http://hl7.org/fhirpath/2018May/index.html#aggregate-aggregator-expression-init-value-value, which is labeled as 1.1 of FHIRPath and "STU2 Ballot". I am not sure when the voting on that "ballot" will happen, but I would guess we can go ahead and add "aggregator".

view this post on Zulip nicola (RIO/SS) (Aug 11 2018 at 20:16):

@Bryn Rhodes and @Grahame Grieve can you clarify what means to evaluates to true and evaluates to false - [true] and [false] ?

view this post on Zulip nicola (RIO/SS) (Aug 11 2018 at 20:20):

And what function not() should do, if it is passed for example collection of integers? Throws exception?

view this post on Zulip nicola (RIO/SS) (Aug 11 2018 at 20:22):

What the real reason to have this ternary logic?

view this post on Zulip nicola (RIO/SS) (Aug 11 2018 at 20:33):

I like list and maybe functors, but may be everything is a collection brings strange semantic to simple things like if and not + - etc and we still have errors in runtime :(

view this post on Zulip Grahame Grieve (Aug 14 2018 at 01:24):

I thought the spec was pretty clear about this....


Last updated: Apr 12 2022 at 19:14 UTC