Stream: questionnaire
Topic: Questionnaire form rendering in IG
Jose Costa Teixeira (May 08 2021 at 18:05):
I was thinking of adding some rendering of forms to the IG, so I looked into the LHC Forms. The integration is not hard, but then I noticed the license - seems to be derived from BSD - as far as I know that will be an issue.
@Lloyd McKenzie thoughts?
Lloyd McKenzie (May 08 2021 at 19:04):
I think the intention is to have a hyperlink to the LHC URL that renders arbitrary forms, not to integrate LHC into the publisher itself
Jose Costa Teixeira (May 08 2021 at 21:37):
I wanted to have another tab in the IG - for users it is much easier to understand a form-like display than the tree display. Instead fof trying to do it in the java renderer, using a available renderer would be better
Grahame Grieve (May 09 2021 at 20:59):
if you want SDC compliance, then you'll need an app. So referring to LHC is the practical option
Paul Lynch (May 10 2021 at 11:51):
Jose Costa Teixeira said:
I was thinking of adding some rendering of forms to the IG, so I looked into the LHC Forms. The integration is not hard, but then I noticed the license - seems to be derived from BSD - as far as I know that will be an issue.
Just curious-- what it is the issue with the LHC-Forms license that is cause for concern?
Jose Costa Teixeira (May 10 2021 at 12:00):
the licenses we use are Apache and MIT to remove restrictions from reuse, even commercial reuse.
I was assuming that BSD was more restrictive, but apparently it isn't ? https://snyk.io/blog/mit-apache-bsd-fairest-of-them-all/
@Grahame Grieve can we use BSD-licensed bits in the IG publisher?
Grahame Grieve (May 10 2021 at 12:01):
sure. but I think is not 'in the publisher' but in the IGs, which is a different consideration
Jose Costa Teixeira (May 10 2021 at 12:05):
sorry, I meant in the (base?) template.
Paul Lynch (May 10 2021 at 12:10):
Jose Costa Teixeira said:
the licenses we use are Apache and MIT to remove restrictions from reuse, even commercial reuse.
The LHC-Forms license allows commercial re-use. "...permitted for commercial and non-commercial purposes and products alike, provided that the following conditions are met..."
Jose Costa Teixeira (May 10 2021 at 12:16):
Paul Lynch said:
Jose Costa Teixeira said:
the licenses we use are Apache and MIT to remove restrictions from reuse, even commercial reuse.
The LHC-Forms license allows commercial re-use. "...permitted for commercial and non-commercial purposes and products alike, provided that the following conditions are met..."
Right @Paul Lynch sorry I did not make the point clear - I had the idea that the BSD license was more restrictive than it is. My bda
Jose Costa Teixeira (May 10 2021 at 12:16):
My bad
Paul Lynch (May 10 2021 at 12:17):
No problem!
Jose Costa Teixeira (May 10 2021 at 12:18):
So could we add the LHC forms to the IG template?
Jose Costa Teixeira (May 10 2021 at 12:19):
the idea would be to make it look like this:
image.png
Paul Lynch (May 10 2021 at 12:20):
I think the idea Grahame was going for was to have a link to a viewer, rather than including LHC-Forms (or other viewers) directly. We have a viewer app that uses LHC-Forms, which will show a Questionnaire whose URL is provided as a parameter.
Paul Lynch (May 10 2021 at 12:21):
https://lhncbc.github.io/questionnaire-viewer/
Jose Costa Teixeira (May 10 2021 at 12:21):
yes, but I think for the users it is more interesting not to navigate away from the IG, and not to mess with uploading files
Paul Lynch (May 10 2021 at 12:25):
Users would not have to upload the Questionnaire-- you would provide the URL for the Questionnaire as a parameter to the link to the viewer. So, the user would just click on the link to see it. I agree it is less convenient to have to click to see it, but there was some concern about including JavaScript in the IGs, as I recall.
Jose Costa Teixeira (May 10 2021 at 12:35):
yes, this is what I am proposing to add - the javascript to the IG so that questionnaires are displayed as a form. I can do it in "my" templates as long as the code is not harmful (I presume we can trust the LHC). Or we can do it for everyone.
Grahame Grieve (May 10 2021 at 12:37):
I prefer it to be an external link, and it must be a choice that authors have , to make it external, so that bugs or issues in LHC are not reported as ballot issues
Paul Lynch (May 10 2021 at 12:49):
I think if an IG reviewer clicks on a link to an external renderer, and sees a problem with the rendered form, they might not know whether the problem is with the form definition (a ballot issue) or with the renderer. Also, if the rendering has significant problems, it still might be a valid ballot issue to ask that the link be removed for that form (if a correction is not available). So, it is not clear to me how having them be external links changes things, though maybe it would help somewhat.
Paul Lynch (May 10 2021 at 12:53):
One advantage of including LHC-Forms directly is that a particular version of LHC-Forms can be included. An external link points to a website which will be updated from time to time, and links from an IG might eventually break (though in our case we try to prevent that).
Jose Costa Teixeira (May 10 2021 at 14:03):
Grahame Grieve said:
I prefer it to be an external link, and it must be a choice that authors have , to make it external, so that bugs or issues in LHC are not reported as ballot issues
I was thinking of an extension that enables the form renderer (and which renderer to use in case we have many - internal LHC vs external LHC)
Jose Costa Teixeira (May 10 2021 at 17:41):
so, assuming this integration is still a good idea, I have a challenge with the CSS. the css for the lhc conflicts with the css for the forms
Paul Lynch (May 10 2021 at 17:49):
For LHC-Forms specific issues, you can just send me a PM with the details. (I am not sure whether integration is just frowned upon or forbidden. Because of Grahame's time zone, it might be a few hours before we hear further from him.)
Jose Costa Teixeira (May 13 2021 at 07:53):
I think we could have an inline rendering of the questionnaire (evtl with a disclaimer "This is just a preview", and a button for other rendering mechanisms.
Jose Costa Teixeira (May 13 2021 at 07:54):
After trying 2 rendering options, the current challenge is with valuesets.
The IG Publisher has all the information needed, but i need to do some post-processing to get the valueset expansions.
Jose Costa Teixeira (May 13 2021 at 08:00):
if a questionnaire uses a valueset (contained or not), the rendering needs to look into another file for getting the expansion of that valueset.
I think this can be done with
a) some javascript
b) the java code for the renderer if PRs are accepted
Jose Costa Teixeira (May 13 2021 at 08:01):
I'd favour b) where I'm largely incompetent
I'm also incompetent with a) but would be easier to get contributions
Paul Lynch (May 13 2021 at 14:54):
Jose Costa Teixeira said:
if a questionnaire uses a valueset (contained or not), the rendering needs to look into another file for getting the expansion of that valueset.
The contained ValueSet can include the expansion (if it the set is small enough).
Jose Costa Teixeira (May 13 2021 at 16:02):
Right, I am looking at automating the entire chain in a way that we can use expanded VS or not, contained or not, intensional or extensional...
Brian Postlethwaite (May 16 2021 at 05:24):
For the sample renderer you really just want to embed the expansion in the Questionnaire so that it's not so tough, and to get the idea, you only need a subset of the items.
Jose Costa Teixeira (May 16 2021 at 06:26):
That's actually a good point. Create a questionnaire that contains the expanded VSs, limited to only a few values
Jose Costa Teixeira (May 16 2021 at 06:27):
Is there a way to call $expand but only include up to N (e.g. 15) values?
Lloyd McKenzie (May 16 2021 at 19:31):
Yes - just use the 'count' argument
Last updated: Apr 12 2022 at 19:14 UTC