Stream: questionnaire
Topic: sdc calculatedExpression repeats
Spencer Evans (Dec 19 2019 at 22:25):
Hi all,
just want to confirm some intuition that isn't covered in the spec. There shouldn't ever be a calculatedExpression (https://build.fhir.org/ig/HL7/sdc/expressions.html#calculatedExpression) that is attached to a item with repeats = true, correct? It wouldn't make sense to me for repeats to ever be used here since calculatedExpression should be deterministic, in which case we'd inevitably just have a duplicated answer.
note: I think that a calculatedExpression item within a group that itself repeats is a legit use case (though a difficult one to grapple with) but that is not my question right now.
Paul Lynch (Dec 19 2019 at 23:15):
That sounds correct to me, although I don't know if it is necessary to enforce it. I can't think of a case where it would be desirable, but I don't see any harm in it either.
Lloyd McKenzie (Dec 19 2019 at 23:58):
CalculatedExpression doesn't necessarily result to a numeric value. With FHIRPath, it could evaluate to a collection and thus satisfy mutliple answers. I can't think of a situation where you'd want to do this, but I don't know that it's wrong to do so..
Spencer Evans (Dec 20 2019 at 21:36):
Good point Lloyd. That sounds reasonable and after thinking about it some more, about what I'd expect! As you both suggest, probably something that wouldn't come up but wanted to check anyways. Thank you Paul and Lloyd :)
Lloyd McKenzie (Dec 20 2019 at 23:28):
@Spencer Evans Would you mind submitting a change request for us to add some language clarifying expected behavior here?
Last updated: Apr 12 2022 at 19:14 UTC