Stream: questionnaire
Topic: Grid Question
Anubhav Gulati (Jan 03 2022 at 13:32):
How we can implement Grid question/question response type in FHIR R4.
R5 QuestionnaireItemUIControlCodes has a grid option but its in draft version. Can someone please help how we can implement grid in questionnaire/questionnaire response where each column data type might be same or different.
As an example, below is a GRID with 4 columns of different data type -
Col 1 (Date) | Column 2 (Signature) | Column 3 (Boolean) | Column 4 (String)
Row 1
Row 2
Row 3
How can I implement this in R4 Questionnaire/Questionnaire Response.
Lloyd McKenzie (Jan 03 2022 at 18:16):
You could, by mutual agreement, choose to pre-adopt the R5 'grid' control code in R4. It wouldn't technically be valid, but it's probably the mechanism most likely to work with tools.
Anubhav Gulati (Jan 03 2022 at 18:57):
Ok, thanks for your reply. Is there any sample JSON which you can provide ? I can't see any example for this ?
Lloyd McKenzie (Jan 03 2022 at 19:15):
Unfortunately, I don't think there is an example in the current SDC spec. I'm also not sure if any of the tools currently support it. @Brian Postlethwaite @Paul Lynch ?
Brian Postlethwaite (Jan 03 2022 at 20:27):
Isn't that just a gtable?
Paul Lynch (Jan 03 2022 at 20:27):
LHC-Forms does not support "grid" yet, though it is on our list of things to do.
Brian Postlethwaite (Jan 03 2022 at 20:31):
https://sqlonfhir-r4.azurewebsites.net/fhir/Questionnaire/table-test
Brian Postlethwaite (Jan 03 2022 at 20:33):
Anubhav Gulati (Mar 02 2022 at 20:32):
Thanks for your reply. It helps a bit, but still trying to understand it better.
1) Can you please provide 1 or 2 more examples ?
2) Also Gtable is "Questions within the group are columns in the table with each group repetition as a row. Used for single-answer questions".
How can we support multi choice answers in grid ?
Thanks.
Brian Postlethwaite (Mar 02 2022 at 21:38):
2) would depend on the question type for the user experience, from the data that's pretty easy, it's just more answers in the item.answer array.
(Noting the Telstra renderer doesn't support the multi-select in a table at present)
Anubhav Gulati (Mar 03 2022 at 10:55):
Thanks Brian. One last question on gtable definition - Questions within the group are columns in the table with each group repetition as a row
For a group (same questions within group), we have multiple rows. So just want to make sure that gtable is right fit for my use case, because when I read definition each group repetition as a row, first impression comes to mind is that only a single row is supported for the group , but not multiple rows ?
Can gtable fit for a group G1 having multiple rows and columns ?
Lloyd McKenzie (Mar 03 2022 at 18:54):
You'd typically use a "drop-down" type control in each cell, allowing the user to select from multiple answers, one per question per group.
Last updated: Apr 12 2022 at 19:14 UTC