FHIR Chat · Conflicts between itemControl extension and other elements · questionnaire

Stream: questionnaire

Topic: Conflicts between itemControl extension and other elements


view this post on Zulip Morten Ernebjerg (Jun 18 2021 at 10:01):

The itemControl extension is meant for indicating how certain questions should be rendered (slider, table etc.). However, some of the options in the associated, extensible code system can seemingly clash with other entries in the item element. For instance, if I have set item.repeats = true and then add itemsControl with the code radio-button, we have an apparent contradiction since a radio-button UI-element only allows choosing a single option (though I suppose that one could render multiple sets of radio buttons...).

Since the description of the extension says "Different controls may be appropriate for different item types. ", I would take the approach that if there is an apparent contradiction that my UI cannot resolve, the non-extension element wins. So if I have repeats = true, I would ignore the request in the extension to render it as a radio-button. Does that sound sensible?

view this post on Zulip Brian Postlethwaite (Jun 20 2021 at 07:19):

For my implementation, if we got that case we would switch to check boxes.

view this post on Zulip Brian Postlethwaite (Jun 20 2021 at 07:19):

We consider that's close enough to the intent.

view this post on Zulip Morten Ernebjerg (Jun 21 2021 at 09:36):

@Brian Postlethwaite Thanks for the feedback, just make sure I understand you correctly: your implementation gives repeats precedence over the extension in conflict cases, correct?

view this post on Zulip Brian Postlethwaite (Jun 21 2021 at 09:43):

It interprets a repeating radio as a set of check boxes (multi select radios)

view this post on Zulip Brian Postlethwaite (Jun 21 2021 at 09:45):

A repeating drop list shows selected values in the text box portion.

view this post on Zulip Lloyd McKenzie (Jun 25 2021 at 00:01):

It wouldn't be a bad idea for the SDC IG to give some guidance about that - i.e. that renderers should take the itemControl as a recommendation but are free to ignore it, substitute or even raise an error if what's requested is either nonsensical or unavailable. (Typically proceeding with best effort is better than raising an error.) @Morten Ernebjerg, do you want to submit a change request?

view this post on Zulip Morten Ernebjerg (Jun 25 2021 at 07:52):

Yup, I opened FHIR-32979. However, as I think this problem is relevant even outside the context of SDC (e.g. I am not working with SDC), I put the ticket on the core spec & Questionnaire for now.


Last updated: Apr 12 2022 at 19:14 UTC