Stream: questionnaire
Topic: Best practice for answerValueSet + enableWhen
Vadim Peretokin (Nov 22 2021 at 16:52):
Q1 is a #choice with an answerValueSet, Q2 needs an enableWhen on Q1. Is it best practice to use a enableWhen.answerString or enableWhen.Coding?
Lloyd McKenzie (Nov 22 2021 at 18:06):
Coding, if you're matching on coded values. In theory you could have an enableWhen based on a string, but given that equality is going to consider differences in case, whitespace, spelling, accents, punctuation, etc. as significant, using enableWhen with 'string' is pretty unwise
Vadim Peretokin (Nov 23 2021 at 07:52):
Got it thanks. I take it it's normal the publisher just renders Enable When:
and doesn't actually show the invariant when I have this:
"enableWhen" : [
{
"question" : "ComorbiditiesSACQ",
"operator" : "=",
"answerCoding" : {
"system" : "http://snomed.info/sct",
"code" : "56265001"
}
}
Screenshot-2021-11-23-at-8.52.43-AM.png
?
Brian Postlethwaite (Nov 23 2021 at 08:00):
That expression looks right to me.
Vadim Peretokin (Nov 23 2021 at 08:00):
Thanks for checking!
Last updated: Apr 12 2022 at 19:14 UTC