Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Page" itemControl bugs #1041

Open
fongsean opened this issue Oct 23, 2024 · 1 comment
Open

"Page" itemControl bugs #1041

fongsean opened this issue Oct 23, 2024 · 1 comment

Comments

@fongsean
Copy link
Collaborator

There is a slight issue on how the "page" itemControl is implemented previously.

From "Page" in https://hl7.org/fhir/extensions/ValueSet-questionnaire-item-control.html:

Indicates that the content within the group should appear as a logical "page" when rendering the form, such that all enabled items within the page are displayed at once, but items in subsequent groups are not displayed until the user indicates a desire to move to the 'next' group. (Header and footer items may still be displayed.) This designation may also influence pagination when printing questionnaires. If there are items at the same level as a 'page' group that are listed before the 'page' group, they will be treated as a separate page. Header and footer groups for a questionnaire will be rendered on all pages.

Few points to note based on this:

  1. It would make sense to assume that a "page" can only be rendered at the top level.

  2. There will not be a mixture of page items and non-page items anymore (as shown below).
    image

  3. If there is a page item at the top level, the entire questionnaire will be rendered as a paginated questionnaire.


On point 2, if there is a need for the mixture of page + non-page items to be brought back in the future, an API can potentially be exposed to configure its behaviour. Another issue has to be raised.

@lamurian
Copy link

lamurian commented Jan 17, 2025

Not to raise a rebuttal, but I suppose this is worth consideration. The way the page is rendered gives leeway on implementing a faux header and faux footer. For example, this is how we use Smart Forms in our platform: https://dev-app.konsulin.care/assessments/big-five-inventory

In this example, the instruction section acts as a faux header and is in a different group than the paginated section. When the user finishes all questions, there will be a scoring and a short interpretation section as a faux footer.

Of course, the ideal solution would be to implement a header and footer conforming with FHIR Spec and constrain the page so it can only rendered at the top level.


Edit:

On second thought, the current implementation is very similar to Aidbox Forms by Health Samurai. For instance, you can try with the following Questionnaire: Big Five Personality Inventory.

Screenshot from Aidbox Form:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants