FHIR Chat · Questionnaire Rendering in IG · IG creation

Stream: IG creation

Topic: Questionnaire Rendering in IG


view this post on Zulip 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

view this post on Zulip 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 ...)

view this post on Zulip 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

view this post on Zulip Grahame Grieve (Jun 23 2020 at 23:36):

what enable when rendering are you talking about?

view this post on Zulip Brian Postlethwaite (Jun 23 2020 at 23:36):

Yes, it does.

view this post on Zulip Brian Postlethwaite (Jun 23 2020 at 23:36):

Like in the first image above.

view this post on Zulip Brian Postlethwaite (Jun 23 2020 at 23:37):

This is from the definitions section for the same questionnaire/item
image.png

view this post on Zulip 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)

view this post on Zulip 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

view this post on Zulip 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.

view this post on Zulip Lloyd McKenzie (Aug 04 2020 at 17:47):

What errors are you seeing?

view this post on Zulip Grahame Grieve (Aug 04 2020 at 21:06):

I expect the rendering to be fine now, so tell us what the error is

view this post on Zulip 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.

view this post on Zulip Grahame Grieve (Aug 04 2020 at 23:25):

can I reproduce?

view this post on Zulip 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").

view this post on Zulip Elliot Silver (Aug 04 2020 at 23:49):

Everything else is commented out of the IG right now.

view this post on Zulip Grahame Grieve (Aug 05 2020 at 00:34):

can I reproduce this without lots of work to set up a new IG?

view this post on Zulip 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

view this post on Zulip 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

view this post on Zulip 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"
    }
  ]
}

view this post on Zulip Chris Moesel (Aug 05 2020 at 00:57):

And in the ImplementationGuide JSON:

"resource": [
      {
        "reference": {
          "reference": "Questionnaire/WhoCrQuestionnaireCovid19Surveillance"
        },
        "name": "WhoCrQuestionnaireCovid19Surveillance",
        "description": "TODO",
        "exampleBoolean": false
      }
    ],

view this post on Zulip Elliot Silver (Aug 05 2020 at 01:16):

@Chris Moesel , did you get the build errors I was seeing?

view this post on Zulip Elliot Silver (Aug 05 2020 at 01:52):

@Grahame Grieve, is this what you need? questionnaire-error.zip

view this post on Zulip Grahame Grieve (Aug 05 2020 at 01:55):

yes I forgot to set a mode. All the errors will disappear next release

view this post on Zulip 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?

view this post on Zulip Grahame Grieve (Aug 05 2020 at 02:07):

it certainly should

view this post on Zulip Elliot Silver (Aug 05 2020 at 02:11):

Great.

view this post on Zulip 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?

view this post on Zulip 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.

view this post on Zulip 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

view this post on Zulip Grahame Grieve (Aug 06 2020 at 19:56):

what template are you using?

view this post on Zulip Elliot Silver (Aug 06 2020 at 20:32):

FHIR.base.template#current, but I also tried with HL7.fhir.template

view this post on Zulip 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

view this post on Zulip 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?

view this post on Zulip Grahame Grieve (Aug 06 2020 at 22:23):

then why did you say:

There should be multiple tabs

view this post on Zulip Lloyd McKenzie (Aug 06 2020 at 22:24):

Because I thought it had been done. I was wrong :(

view this post on Zulip Grahame Grieve (Aug 06 2020 at 22:31):

well, that'll be why Elliott is just getting the basic tree display

view this post on Zulip Elliot Silver (Aug 07 2020 at 01:18):

Which IGs have the multiple tabs?

view this post on Zulip Grahame Grieve (Aug 07 2020 at 01:20):

none yet, I think

view this post on Zulip Elliot Silver (Aug 07 2020 at 01:20):

Do any of the templates?

view this post on Zulip 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

view this post on Zulip 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.

view this post on Zulip Grahame Grieve (Aug 07 2020 at 01:29):

what is it you actually want?

view this post on Zulip Grahame Grieve (Aug 07 2020 at 01:29):

an actual form filler application?

view this post on Zulip 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.

view this post on Zulip 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

view this post on Zulip 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.

view this post on Zulip Grahame Grieve (Aug 07 2020 at 01:36):

you want to get to making that PR..

view this post on Zulip 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."

view this post on Zulip Grahame Grieve (Aug 07 2020 at 01:41):

well, it's one of the tabs...

view this post on Zulip Elliot Silver (Aug 07 2020 at 01:44):

OK. Thanks.

view this post on Zulip 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?

view this post on Zulip 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.

view this post on Zulip 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 .

view this post on Zulip 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

view this post on Zulip 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.

view this post on Zulip 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?

view this post on Zulip 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

view this post on Zulip Elliot Silver (Aug 07 2020 at 04:05):

OK, I'll look there. Thanks for all the help.

view this post on Zulip Brian Postlethwaite (Aug 26 2020 at 11:21):

This AnswerOption null link error is one that I've hit too.

view this post on Zulip Grahame Grieve (Aug 26 2020 at 11:22):

it's on my list

view this post on Zulip Brian Postlethwaite (Aug 26 2020 at 11:25):

Something I can assist with?

view this post on Zulip 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.

view this post on Zulip 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

view this post on Zulip 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.

view this post on Zulip Grahame Grieve (Aug 26 2020 at 11:32):

it's not in the code ;-) - that's the problem....

view this post on Zulip Elliot Silver (Sep 02 2020 at 22:34):

@Lloyd McKenzie Is there an update on the template update?

view this post on Zulip Lloyd McKenzie (Sep 02 2020 at 22:52):

Post-WGM

view this post on Zulip Elliot Silver (Sep 03 2020 at 00:16):

Thank you.

view this post on Zulip 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?

view this post on Zulip 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.

view this post on Zulip Elliot Silver (Oct 22 2020 at 03:44):

Great thanks. If there's some way I can help, please let me know.

view this post on Zulip 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

view this post on Zulip Jose Costa Teixeira (Oct 23 2020 at 05:23):

is this the rendering?

view this post on Zulip Grahame Grieve (Oct 23 2020 at 07:58):

I think that's not the form rendering

view this post on Zulip Jose Costa Teixeira (Oct 23 2020 at 10:34):

I have the following fragments
-responses
-dict
-logic
-links
-form
-tree
-html

view this post on Zulip Jose Costa Teixeira (Oct 23 2020 at 13:40):

the one that I showed is the form.

view this post on Zulip Grahame Grieve (Oct 23 2020 at 19:46):

then I thought wrong

view this post on Zulip Jose Costa Teixeira (Oct 23 2020 at 21:34):

So the above is what we have now?

view this post on Zulip 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)

view this post on Zulip Brian Postlethwaite (Oct 23 2020 at 23:43):

I'll try putting a sample out there.

view this post on Zulip Grahame Grieve (Oct 24 2020 at 02:13):

that's what we have though making it better is on my todo list

view this post on Zulip Brian Postlethwaite (Feb 11 2021 at 23:14):

How is this icon for choice?
image.png

view this post on Zulip Jose Costa Teixeira (Feb 11 2021 at 23:30):

better because more discrete, but not really telling

view this post on Zulip Brian Postlethwaite (Feb 11 2021 at 23:32):

And just coz, open choice and boolean for consistency
image.png

view this post on Zulip 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

view this post on Zulip Lloyd McKenzie (Feb 12 2021 at 02:04):

I like this style. Perhaps numeric contains a 123 and decimal contains a 0.1?

view this post on Zulip Lloyd McKenzie (Feb 12 2021 at 02:05):

Something similar for calendar & date.

view this post on Zulip 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.

view this post on Zulip Richard Townley-O'Neill (Feb 12 2021 at 02:28):

Or whet their appetite for more. :smiley:

view this post on Zulip Kevin Mayfield (Feb 13 2021 at 08:17):

Is simplifier looking at rendering of Questionnaire? @Ward Weistra

view this post on Zulip 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.

view this post on Zulip 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

view this post on Zulip 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).

view this post on Zulip 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