Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customizing UI via formbuilder - gtable #87

Open
annabel-uzl opened this issue Jun 18, 2024 · 5 comments
Open

Customizing UI via formbuilder - gtable #87

annabel-uzl opened this issue Jun 18, 2024 · 5 comments

Comments

@annabel-uzl
Copy link

Linked to LHNCBC/lforms#115 (comment)

When using Lforms you can adapt the json structure of your questionnaire to use gtable to customize your UI a bit. However, our doctors cannot change the json. Therefore we would like a way to implement tables in Lforms by doing some setup in formbuilder.

@plynchnlm
Copy link
Member

Thanks for bringing this issue up. I am hoping we can get gtable support in the formbuilder live within a few weeks.

However, in the issue you linked to, you mentioned "nested tables". If by that you mean a table inside another table, that is not something LHC-Forms supports, and I am not sure what that would look like. Do you have a picture you could share of what you are trying to achieve?

@annabel-uzl
Copy link
Author

image
image
image
image
image

Yes, by "nested tables" I mean a table inside another table. Attached some examples of what we do now with infoPath (in Dutch, apologies). I feel like this is more a nice-to-have to further customize the layout of the forms but I also think grouping some questions can enhance reading performance

@plynchnlm
Copy link
Member

gtable support gives you a table in which the questions are the columns, and the rows are the answers. You can have more than one row of answers if repeats=true for the group. Here is an example: https://rxterms.nlm.nih.gov/

The kinds of layouts above make sense for paper forms or for applications that are trying to fit everything onto one screen, but in a web browser is it not necessary to be so compact in the layout; the page scan scroll. So far there is no mechanism for representing these kinds of layouts in FHIR Questionnaire. There is a mechanism for breaking the form into pages (itemControl=page) and or tabs (itemControl=tab-container), for which we are planning to add support. If that is not sufficient for your needs, then you can always propose something new. The best place to bring that up would be on the "questionnaire" stream on chat.fhir.org, and after some discussion there, you could file a Jira ticket at jira.hl7.org.

@plynchnlm
Copy link
Member

After looking at these examples a bit more, it seems (though I can't be sure because my understanding of Dutch is limited to "ja" and "nee") that in the first and third examples what the form is doing is with columns is what you would do with "enableWhen" in FHIR. That is, in the first column the user selects a check box, and then only answers the questions to the right of the selected checkbox in the next column, and so on. In FHIR Questionnaire, you would have that left-most question first, and then when the user selects an answer, there would be a group below with enableWhen set up to show itself in response to that answer.

@annabel-uzl
Copy link
Author

@plynchnlm Thanks for explaining this so clearly! I think you are right that we can probably do a similar thing using enableWhen and gtable. We'll try that first and if that's not sufficient for the user, we can always go brainstorming on the fhir-chat.
The support for itemControl=tab-container is something we'll definitely use as well :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants