Stream: IG creation
Topic: Questionnaire Rendering in IG
Brian Postlethwaite (Jun 23 2020 at 23:31):
The Questionnaire renderer in the IG is looking pretty good, with these 2 outstanding parts...
image.png
The Enable when rendering on the definitions page looks good, but hasn't made it's way onto the tree view.
The options link is fine if there is a valueset reference, if it is just a set of codings supplied, this isn't really the correct link - not sure what it should do here, maybe just link to the definitions section? which is tough, as my IG rendering has that as a tab on the page.
image.png
Brian Postlethwaite (Jun 23 2020 at 23:34):
Just to provide a little more of a sample of how the Questionnaire display looks...
image.png
(I really like what you've done @Grahame Grieve ...)
Grahame Grieve (Jun 23 2020 at 23:36):
thanks. I thought the options thing did link to the definitions page? Having in on a tab... that makes things more difficult
Grahame Grieve (Jun 23 2020 at 23:36):
what enable when rendering are you talking about?
Brian Postlethwaite (Jun 23 2020 at 23:36):
Yes, it does.
Brian Postlethwaite (Jun 23 2020 at 23:36):
Like in the first image above.
Brian Postlethwaite (Jun 23 2020 at 23:37):
This is from the definitions section for the same questionnaire/item
image.png
Brian Postlethwaite (Jun 23 2020 at 23:43):
Is there a way to get the Raw json content into the HTML without any markup around it?
(wanting to get it into the javascript code to load into our custom form renderer)
Grahame Grieve (Jun 23 2020 at 23:48):
Is there a way to get the Raw json content into the HTML without any markup around it?
I don't know what that means
Elliot Silver (Aug 04 2020 at 15:53):
What is the current state of IG Questionnaire rendering? I've got a Questionnaire instance in an IG based on fhir.base.template, and the publisher's generated narrative is throwing errors when I build.
Lloyd McKenzie (Aug 04 2020 at 17:47):
What errors are you seeing?
Grahame Grieve (Aug 04 2020 at 21:06):
I expect the rendering to be fine now, so tell us what the error is
Elliot Silver (Aug 04 2020 at 22:09):
The things I'm seeing are:
image.png
and:
image.png
My resource has no narrative, so this must be coming from the generated one.
Grahame Grieve (Aug 04 2020 at 23:25):
can I reproduce?
Elliot Silver (Aug 04 2020 at 23:48):
I'm doing a fsh IG. config.yaml template:
id: myorg.cr
canonical: http://www.example.com/fhir/cr
name: CaseReport
status: draft
version: 0.1.0
fhirVersion: 4.0.1
copyrightYear: 2020+
releaseLabel: ci-build
title: "Case Reporting"
publisher:
name: MyOrg Organization
url: http://www.example.com
template: fhir.base.template#current
And questionnaire:
Instance: WhoCrQuestionnaireCovid19Surveillance
InstanceOf: Questionnaire
Usage: #definition
Description: "TODO"
* name = "WhoCrQuestionnaireCovid19Surveillance"
* title = "Revised case report form for Confirmed Novel Coronavirus COVID-1"
* version = "2020.2"
* subjectType = #Patient
* status = #draft
* experimental = true
* publisher = "World Health Organization"
* url = "http://who.int/fhir/cr/Covid19SurveillanceCRF"
* item[0].linkId = "report_date"
* item[0].text = "Date of reporting to national health authority:"
* item[0].type = #string
This is results in 6 errors: txt-1, illegal element name in the XHTML ("input"), illegal attribute name in the XHTML ("size", "name", "placeholder", and "type" on "input").
Elliot Silver (Aug 04 2020 at 23:49):
Everything else is commented out of the IG right now.
Grahame Grieve (Aug 05 2020 at 00:34):
can I reproduce this without lots of work to set up a new IG?
Chris Moesel (Aug 05 2020 at 00:52):
Depends on your definition of "lots of work", but using SUSHI 0.15.0, you can:
- run
sushi --init
and answer a few questions (IG name, id, canonical, status, version) -- which will create a new ready-to-build SUSHI project - (optionally) edit generated
fsh/config.yaml
- edit
fsh/patient.fsh
file to add the FSH you need to reproduce - run
./_updatePublisher
- run
./_genonce
Chris Moesel (Aug 05 2020 at 00:55):
Although, that's weird. I just did exactly that and the publisher didn't run SUSHI for some reason (even though I have a fsh
folder)... Hrm.... In that case you might need to manually invoke SUSHI before running ./_genonce
Chris Moesel (Aug 05 2020 at 00:56):
But since I just did it, here's the Questionnaire JSON that SUSHI produced (if that's helpful):
{
"resourceType": "Questionnaire",
"id": "WhoCrQuestionnaireCovid19Surveillance",
"name": "WhoCrQuestionnaireCovid19Surveillance",
"title": "Revised case report form for Confirmed Novel Coronavirus COVID-1",
"version": "2020.2",
"subjectType": [
"Patient"
],
"status": "draft",
"experimental": true,
"publisher": "World Health Organization",
"url": "http://who.int/fhir/cr/Covid19SurveillanceCRF",
"item": [
{
"linkId": "report_date",
"text": "Date of reporting to national health authority:",
"type": "string"
}
]
}
Chris Moesel (Aug 05 2020 at 00:57):
And in the ImplementationGuide JSON:
"resource": [
{
"reference": {
"reference": "Questionnaire/WhoCrQuestionnaireCovid19Surveillance"
},
"name": "WhoCrQuestionnaireCovid19Surveillance",
"description": "TODO",
"exampleBoolean": false
}
],
Elliot Silver (Aug 05 2020 at 01:16):
@Chris Moesel , did you get the build errors I was seeing?
Elliot Silver (Aug 05 2020 at 01:52):
@Grahame Grieve, is this what you need? questionnaire-error.zip
Grahame Grieve (Aug 05 2020 at 01:55):
yes I forgot to set a mode. All the errors will disappear next release
Elliot Silver (Aug 05 2020 at 02:00):
Thank you. There were also some issues with the actual rendering, but I'll wait to see how they appear in the next release.
Does the questionnaire rendering now support enableWhen and repeats?
Grahame Grieve (Aug 05 2020 at 02:07):
it certainly should
Elliot Silver (Aug 05 2020 at 02:11):
Great.
Elliot Silver (Aug 06 2020 at 16:12):
I've upgraded to the latest IG publisher, and the rendering is totally different now. Before, I was getting something that looked like a web form. Now I'm getting something similar to the FHIR resource structure. Is that what I should expect?
Lloyd McKenzie (Aug 06 2020 at 17:10):
There should be multiple tabs. The web form view should still be there. Feedback about which should be the first/default tab welcome.
Elliot Silver (Aug 06 2020 at 17:15):
Lloyd McKenzie said:
There should be multiple tabs. The web form view should still be there.
That was what I expected too, but not what I'm seeing.
image.png
Grahame Grieve (Aug 06 2020 at 19:56):
what template are you using?
Elliot Silver (Aug 06 2020 at 20:32):
FHIR.base.template#current, but I also tried with HL7.fhir.template
Grahame Grieve (Aug 06 2020 at 21:16):
then you should get tabs. I'm not sure where to go from here unless you have it on github
Lloyd McKenzie (Aug 06 2020 at 21:48):
The template doesn't have a layout for Questionnaire, so not sure how he could get tabs?
Grahame Grieve (Aug 06 2020 at 22:23):
then why did you say:
There should be multiple tabs
Lloyd McKenzie (Aug 06 2020 at 22:24):
Because I thought it had been done. I was wrong :(
Grahame Grieve (Aug 06 2020 at 22:31):
well, that'll be why Elliott is just getting the basic tree display
Elliot Silver (Aug 07 2020 at 01:18):
Which IGs have the multiple tabs?
Grahame Grieve (Aug 07 2020 at 01:20):
none yet, I think
Elliot Silver (Aug 07 2020 at 01:20):
Do any of the templates?
Grahame Grieve (Aug 07 2020 at 01:24):
not yet - the base one will, when Lloyd gets to it, unless some one else gets around to making a PR first
Elliot Silver (Aug 07 2020 at 01:28):
Ah, ok. So I've been chasing something that doesn't exist.
Are you (or anyone) aware of an open source/public resource to display questionnaires? Both Trifolia and NLM's tools are pretty incomplete.
Grahame Grieve (Aug 07 2020 at 01:29):
what is it you actually want?
Grahame Grieve (Aug 07 2020 at 01:29):
an actual form filler application?
Elliot Silver (Aug 07 2020 at 01:33):
I'm building a questionnaire as part of an IG and need to be able to demonstrate it. At first I thought that the IG rendering would be sufficient, but it isn't available yet. Although a full-fledged form filler app would be great, I'd be happy with something less that just lets me show it.
Grahame Grieve (Aug 07 2020 at 01:35):
"show" is a very abstract term. The view you're getting now is the one the 'shows' it the most reliability, if you mean 'what does the questionnaire actually contain?'
if you mean, 'what is the user experience?' - well that's something very different.
if you mean 'what does it look like' - that's often not a very good indicator when you have an active questionnaire
Grahame Grieve (Aug 07 2020 at 01:36):
but there is a 'form-like' view, which is one of the tabs. But it's not the primary view, that's the tree.
Grahame Grieve (Aug 07 2020 at 01:36):
you want to get to making that PR..
Elliot Silver (Aug 07 2020 at 01:40):
Agree, the tree view is a good representation for a technical discussion. I'm looking for the "form-like" view for a less technical audience. It doesn't have to be 100% accurate (pre-population, dynamic behavior, adding repeats, etc.) but it should be "good enough."
Grahame Grieve (Aug 07 2020 at 01:41):
well, it's one of the tabs...
Elliot Silver (Aug 07 2020 at 01:44):
OK. Thanks.
Lloyd McKenzie (Aug 07 2020 at 03:15):
@Elliot Silver - when do you need the improved display? Are you going to ballot or can this wait a couple of weeks?
Elliot Silver (Aug 07 2020 at 03:20):
We haven't decided yet whether to bring this through HL7 and ballot it. Waiting one week isn't an issue, as I'll be on vacation, but I was hoping to start showing it around shortly after that. However, if it isn't in by then, I'll make do.
Elliot Silver (Aug 07 2020 at 03:48):
I'm actually still seeing an error when I run the publisher (shows up in QA.html, but not in the command line error count):
Questionnaire-Surveillance.html#/html/body/div/div/div/div/div/div/table/tr/td/a at Line 217, column 1599 | The link 'null#item.outcome_asymp' for "3 options" cannot be resolved
This appears when I use answerOption for a choice element. It goes away when I use answerValueSet to a ValueSet containing the exact same three values. The relevant part of the sushi-generated Questionnaire resource looks like:
{
"linkId": "outcome_asymp",
"text": "If case was asymptomatic at time of specimen collection resulting in first laboratory confirmation, did the case develop any symptoms or signs at any time prior to discharge or death:",
"type": "choice",
"answerOption": [
{
"valueCoding": {
"code": "N",
"system": "http://terminology.hl7.org/CodeSystem/v2-0136"
}
},
{
"valueCoding": {
"code": "Y",
"system": "http://terminology.hl7.org/CodeSystem/v2-0136"
}
},
{
"valueCoding": {
"code": "unknown",
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason"
}
}
]
},
compared to:
{
"linkId": "outcome_asymp",
"text": "If case was asymptomatic at time of specimen collection resulting in first laboratory confirmation, did the case develop any symptoms or signs at any time prior to discharge or death:",
"type": "choice",
"answerValueSet": "http://www.example.com/fhir/cr/covid19/ValueSet/WhoCrValueSetYesNoUnk"
},
Any obvious reason why one works and not the other?
Also, if I use answerOption, is it valid to use a different display value than the one in the codesystem? I'd like to include text with the option explaining what "Yes" and "No" mean in this context .
Grahame Grieve (Aug 07 2020 at 03:49):
why one works and not the other
because I haven't figured out what to link to for the anwerOptions. that's work in progress
Grahame Grieve (Aug 07 2020 at 03:50):
it is valid to use a different display value but it's also potentially dangerous if the meaning is changed.
Elliot Silver (Aug 07 2020 at 03:54):
No, I'm not changing the meaning of "yes" and "no", I'm just clarifying them. ("No, the case remained asymptomatic", "Yes, the previously asymptomatic case developed symptoms"). I can ignore those warnings then.
Do questionnaires have the capability to do tool-tips/hover-over text that I just missed?
Grahame Grieve (Aug 07 2020 at 03:58):
I think there's an extension in SDC for that, and the Questionnaire Rendering in the IG publisher is SDC compliant
Elliot Silver (Aug 07 2020 at 04:05):
OK, I'll look there. Thanks for all the help.
Brian Postlethwaite (Aug 26 2020 at 11:21):
This AnswerOption null link error is one that I've hit too.
Grahame Grieve (Aug 26 2020 at 11:22):
it's on my list
Brian Postlethwaite (Aug 26 2020 at 11:25):
Something I can assist with?
Grahame Grieve (Aug 26 2020 at 11:26):
I'm not sure. I think I have to find somewhere else on the page to put the answer options.
Grahame Grieve (Aug 26 2020 at 11:26):
I'm not sure what it would look like... that's probably where help would be appropriate
Brian Postlethwaite (Aug 26 2020 at 11:27):
Where is that in the code and I can have a play, as I've got many sample questionnaires with this.
Grahame Grieve (Aug 26 2020 at 11:32):
it's not in the code ;-) - that's the problem....
Elliot Silver (Sep 02 2020 at 22:34):
@Lloyd McKenzie Is there an update on the template update?
Lloyd McKenzie (Sep 02 2020 at 22:52):
Post-WGM
Elliot Silver (Sep 03 2020 at 00:16):
Thank you.
Elliot Silver (Oct 21 2020 at 22:06):
Lloyd McKenzie said:
Elliot Silver - when do you need the improved display? Are you going to ballot or can this wait a couple of weeks?
Hi @Lloyd McKenzie, sorry to bug you, is there an ETA?
Lloyd McKenzie (Oct 22 2020 at 02:30):
I'm hoping to get to this late next week - it's part of the work I need to do for SDC.
Elliot Silver (Oct 22 2020 at 03:44):
Great thanks. If there's some way I can help, please let me know.
Jose Costa Teixeira (Oct 23 2020 at 05:23):
I'm looking for the form rendering of the questionnaire - this is what I found
image.png
Jose Costa Teixeira (Oct 23 2020 at 05:23):
is this the rendering?
Grahame Grieve (Oct 23 2020 at 07:58):
I think that's not the form rendering
Jose Costa Teixeira (Oct 23 2020 at 10:34):
I have the following fragments
-responses
-dict
-logic
-links
-form
-tree
-html
Jose Costa Teixeira (Oct 23 2020 at 13:40):
the one that I showed is the form.
Grahame Grieve (Oct 23 2020 at 19:46):
then I thought wrong
Jose Costa Teixeira (Oct 23 2020 at 21:34):
So the above is what we have now?
Jose Costa Teixeira (Oct 23 2020 at 22:56):
@Brian Postlethwaite I understand you have some thoughts on this too? (just trying to capture what is out there)
Brian Postlethwaite (Oct 23 2020 at 23:43):
I'll try putting a sample out there.
Grahame Grieve (Oct 24 2020 at 02:13):
that's what we have though making it better is on my todo list
Brian Postlethwaite (Feb 11 2021 at 23:14):
How is this icon for choice?
image.png
Jose Costa Teixeira (Feb 11 2021 at 23:30):
better because more discrete, but not really telling
Brian Postlethwaite (Feb 11 2021 at 23:32):
And just coz, open choice and boolean for consistency
image.png
Lloyd McKenzie (Feb 12 2021 at 00:15):
I wouldn't worry about distinguishing open-choice from choice because that's soon going to be a separate axis. I'd put the open/closed in the 'flags' column
Lloyd McKenzie (Feb 12 2021 at 02:04):
I like this style. Perhaps numeric contains a 123 and decimal contains a 0.1?
Lloyd McKenzie (Feb 12 2021 at 02:05):
Something similar for calendar & date.
Richard Townley-O'Neill (Feb 12 2021 at 02:27):
Some reviewers of our documents complain that we do not use icons to distinguish between data types. This might help the.
Richard Townley-O'Neill (Feb 12 2021 at 02:28):
Or whet their appetite for more. :smiley:
Kevin Mayfield (Feb 13 2021 at 08:17):
Is simplifier looking at rendering of Questionnaire? @Ward Weistra
Lloyd McKenzie (Feb 13 2021 at 15:48):
Side note that we've been having a discussion about revamping how Questionnaires are rendered in the IG publisher on our SDC call. Next discussion slated for Mar. 11.
Ward Weistra (Feb 14 2021 at 18:15):
@Kevin Mayfield You can access the viewers from FHIRPower.tools and LHC-Forms directly from any public questionnaire resource (via Tools) on Simplifier.net:
Screenshot-2021-02-14-at-19.10.592.png
Ward Weistra (Feb 14 2021 at 18:16):
You can test on this Covid-19 assessment questionnaire from Data4Life when you're logged in (free account and up).
Kevin Mayfield (Feb 15 2021 at 09:26):
That looks very useful. I'll pass that on.
Last updated: Apr 12 2022 at 19:14 UTC