Stream: questionnaire
Topic: itemControl gtable
Kenneth Myhra (Jan 16 2020 at 12:28):
Trying to reproduce this example using itemControl='gtable':
pasted image
- Should each row (group) be marked with itemControl='gtable'? (see example 1)
- Or should I create a top level group and mark that with itemControl='gtable' and add additional rows (groups) under the top level group? (see example 2)
Example 1.
item.type='group' text='Synsstyrke' item.type='group' itemControl='gtable' text='Uten korreksjon' item.type='string' text='Høyre øye' item.type='string' text='Venstre øye' item.type='string' text='Begge øyne' item.type='group' itemControl='gtable' text='Med korreksjon' item.type='string' text='Høyre øye' item.type='string' text='Venstre øye' item.type='string' text='Begge øyne' item.type='group' itemControl='gtable' text='Korreksjonens styrke' item.type='string' text='Høyre øye' item.type='string' text='Venstre øye
Example 2.
item.type='group' text='Synsstyrke' itemControl='gtable' item.type='group' text='Uten korreksjon' item.type='string' text='Høyre øye' item.type='string' text='Venstre øye' item.type='string' text='Begge øyne' item.type='group' text='Med korreksjon' item.type='string' text='Høyre øye' item.type='string' text='Venstre øye' item.type='string' text='Begge øyne' item.type='group' text='Korreksjonens styrke' item.type='string' text='Høyre øye' item.type='string' text='Venstre øye'
Paul Lynch (Jan 16 2020 at 15:06):
With help from Google translate, here is that table in English:
pasted image
Lloyd McKenzie (Jan 16 2020 at 15:06):
That's something we absolutely need to clarify in the spec. Could you submit a change request @Kenneth Myhra? If so, mention it here and we'll try to discuss it on our conference call tonight.
Paul Lynch (Jan 16 2020 at 15:08):
Each cell in the table is actually a separate question. I don't think the spec handles this case.
Paul Lynch (Jan 16 2020 at 15:24):
You might be able to represent table as a gtable if the left column labels were inserted as prepopulated values (into a read-only field). That seems messier than it should be, though.
Kenneth Myhra (Jan 16 2020 at 15:47):
Kenneth Myhra (Jan 16 2020 at 16:06):
Paul, do you have a visual example of a gtable use case?
Btw I would have joined the conference call, but it's bit late up here in Scandinavia at that point
Lloyd McKenzie (Jan 16 2020 at 16:12):
We get dial-ins from the Netherlands :) (The uncomfortable time is because we also get dial-ins from Australia.)
Paul Lynch (Jan 16 2020 at 16:17):
For a visual example (not based on FHIR, but I think representative of the use case) see https://rxterms.nlm.nih.gov/. Our FHIR representation of that form uses gtable, and I would put that up, but it has a couple of issues (use of a custom extension for the drug name lookup, and the strength lists don't show up for some reason).
Kenneth Myhra (Jan 16 2020 at 16:46):
Might be that my example needs to be restructured into something like this
Paul Lynch (Jan 16 2020 at 16:51):
You could still use groups (item.type="group") for things like "corrected", "not corrected", etc., so you would not have to repeat the strings, and so that the questions (left eye, right eye, both) would be visually grouped under each header. That much should be supported by most FHIR Questionnaire clients today (I would guess).
I think your table is a good case though, and probably should be in the spec somewhere, so I am glad you filed the issue.
Kenneth Myhra (Jan 17 2020 at 13:40):
Saw the resolution on the Jira case, thanks btw for resolving it so quickly!
Still a bit unsure how I would go about defining this in the questionnaire see the two examples below:
Example 1, using itemCode='grid' as an indicator for when a new row starts:
item.type='group' itemCode='grid' item.type='decimal' text='Uten korreksjon|Høyre øye' item.type='decimal' text='Uten korreksjon|Venstre øye' item.type='decimal' text='Uten korreksjon|Begge øyne' item.type='group' itemCode='grid' item.type='decimal' text='Med korreksjon|Høyre øye' item.type='decimal' text='Med korreksjon|Venstre øye' item.type='decimal' text='Med korreksjon|Begge øyne' item.type='group' itemCode='grid' item.type='decimal' text='Korreksjonens styrke|Høyre øye' item.type='decimal' text='Korreksjonens styrke|Venstre øye'
Example 2, using the text on the left side of the vertical bar as a key for each row:
item.type='group' itemCode='grid' item.type='decimal' text='Uten korreksjon|Høyre øye' item.type='decimal' text='Uten korreksjon|Venstre øye' item.type='decimal' text='Uten korreksjon|Begge øyne' item.type='decimal' text='Med korreksjon|Høyre øye' item.type='decimal' text='Med korreksjon|Venstre øye' item.type='decimal' text='Med korreksjon|Begge øyne' item.type='decimal' text='Korreksjonens styrke|Høyre øye' item.type='decimal' text='Korreksjonens styrke|Venstre øye'
Lloyd McKenzie (Jan 17 2020 at 15:55):
Example 2.
Kenneth Myhra (Jan 23 2020 at 12:48):
We have reviewed this in-house and we have a few comments.
- The grid construction as it stands does not work well with form fillers that do not support itemControl='grid' because of the vertical bar in the item.text
- The previous itemControl codes 'atable', 'gtable' and 'table' works fairly well even if the form filler do not support those item codes
So I'm suggesting an amendment which would also be compatible with form fillers that do not support itemCode='grid'.
A group section marked with itemControl='grid' indicates that child items of type='group' within the grid-section are rows, and questions beneath the row-groups are organized as columns in the grid. The grid might be fully populated, but could be sparse. Questions may support different data types and/or different answer choices.
Example:
item.type='group' text='Visual acuity' itemControl='grid' item.type='group' text='Without correction' item.type='decimal' text='Right eye' item.type='decimal' text='Left eye' item.type='decimal' text='Both eyes' item.type='group' text='With correction' item.type='decimal' text='Right eye' item.type='decimal' text='Left eye' item.type='decimal' text='Both eyes' item.type='group' text='Strength of correction' item.type='decimal' text='Right eye' item.type='decimal' text='Left eye'
Lloyd McKenzie (Jan 23 2020 at 16:50):
@Kenneth Myhra Can you submit a new change request pointing to the original?
Kenneth Myhra (Jan 23 2020 at 18:20):
@Lloyd McKenzie J#25599
Last updated: Apr 12 2022 at 19:14 UTC