Questionnaire Viewer
January 16, 2026 1 Comment
In the last post we looked at enhancements that were made to an existing clinFHIR module – the Bundle Viewer. Now let’s take a look at a new module – the Questionnaire Viewer. This was developed as part of the CanShare project in New Zealand and made available to clinFHIR for more general use. It’s still under development (of course 🙂 ), but the current version can be viewed in the clinFHIR test environment here.
Key features of the module include:
- Import any R4 FHIR questionnaire (will be updated to R6 soonish)
- Tree view of the Questionnaire with links to the underlying item elements in the Questionnaire
- An SDC view intended to expose specific SDC based extensions and features
- Using integrations with the Form Tester module in the Fhirpath lab, it can render forms using the CSIRO forms renderer
- Using the same integrations (using SMART web messaging) it can execute SDC based form pre-population, retrieve the QuestionnaireResponse and perform resource extraction, displaying the results within the app or passing it to Bundle Viewer for more detailed inspection of the extracted bundle
Let’s do a quick run through showing this end to end.
Load the module, and select the ‘Request’ Questionnaire as shown in the following screenshot. (You can select any Questionnaire you want – or paste your own one in using the ‘Paste ad-hoc Questionnaire option).

To view the contents, click the blue ‘View’ button to the middle right. The Questionnaire will be parsed, and the Tree view displayed as follows:

This view shows the hierarchical structure of the Questionnaire. Selecting a node in the tree will display a ‘mini-form’ in the middle, and details of the selected node (ie a Questionnaire item element) to the right. Currently the app is optimized for our CanShare use so there are a number of limitations to the mini form, for example:
- It doesn’t support all Questionnaire datatypes
- It doesn’t recognize contained ValueSets
- The terminology server is set to the New Zealand Terminology server
- It only recognizes some ‘enableWhen’ conditionals
- It knows nothing about SDC
These limitations don’t apply to the renderer that we’ll show shortly.
The SDC tab displays a table of SDC based attributes – particularly the ones we’re using in CanShare:

To see the underlying Questionnaire .item, click the LinkId value and you’ll get a popup like this:

This displays the ancestor items of the selected item – useful when chasing down SDC pre-pop and extraction issues as it makes it straightforward to understand the context at any given level by moving up the hierarchy to see where extensions are defined. (The SDC view does this as well, but this ancestor view works well).
Now click on the Rendered Form tab.

There’s a bit that has happened here.
- The left pane showing the rendered form is actually an embedded instance of the Fhirpath lab (in an iframe) and has used SMART web messaging to receive the Questionnaire directly and render it using the CSIRO renderer
- We clicked on the ‘Set pre-populate’ link above the rendered form to set the value of items that have any of the SDC pre-populate options set (note that you can’t change the sample patient at the moment – this will be extended).
- We entered a few of the items. As we do so, the app uses web messaging to retrieve the QuestionnaireResponse from Fhirpath lab and display it to the right (as a table and as the QuestionnaireResponse resource directly). Right now the table view gets a little confused with multiple values – something I’m working on. The QuestionnaireResponse Json is complete though.
Note that in most cases the form renders automatically – however there’s a ‘refresh’ button that will update the rendering if it doesn’t happen directly.
Note also that the ‘mini-form’ limitations mentioned above don’t apply here – as this tab uses the Fhirpath lab & CSIRO renderer, the support of SDC is much more comprehensive.
Now click the ‘Get extract bundle’ link. This will cause the lab to execute the SDC extract operation and return the bundle of resources, which is then displayed in a tabset to the right.

You can view the bundle Json directly, or a graphical view (shown above). You can also pass the bundle to the Bundle Viewer to look at the resource details.
So that’s a quick run through of the Questionnaire Viewer. There’s more documentation here. As you can see, SMART web messaging has allowed a great integration with Fhirpath lab – we’ll discuss that in a separate post.
Use the FHIR chat if you have comments, questions or issues!
Pingback: Enhanced Questionnaire Viewer: New Selection Options Explained