Skip to content

Questionnaire improvements#155

Merged
MariekeMassa merged 24 commits into
developfrom
issues-126-131-135-questionnaire
Jun 2, 2026
Merged

Questionnaire improvements#155
MariekeMassa merged 24 commits into
developfrom
issues-126-131-135-questionnaire

Conversation

@ArdonToonstra

Copy link
Copy Markdown
Collaborator

Closes #126 #131 and #135

Please review carefully. Comments are also in the tickets.

Needs to be done for STU3 as well :(

MariekeMassa and others added 17 commits April 27, 2026 16:15
Previous approach gave error which could not be fixed (Assignment rules must include at least one space both before and after the '=' sign
voor: * compose.include[0].system = "http://fhir.nl/fhir/NamingSystem/uzi-rolcode")
CodeableConcept resulted in 'null!'
Remove large inline answerOption arrays from Questionnaire-ACP-zib2020.json and replace them with answerValueSet references to canonical ValueSets. Add util/questionnaire_item_anwserOption_expander.py: a resolver/expander tool that materialises answerValueSet references back into answerOption lists (writes -expanded copies) for tooling (e.g. NLM LHC-Forms) that cannot resolve ValueSet URLs. The script resolves ValueSets from local fsh-generated resources and the FHIR package cache, fills missing displays (preferring nl-NL), supports pre-computed expansions and compose/include logic, and contains a small hardcoded map for unavailable code systems.
Replace multiple inline answerOption arrays with a single reference to the shared ACP-YesNoUnknown ValueSet (https://api.iknl.nl/docs/pzp/r4/ValueSet/ACP-YesNoUnknownVS) in the Questionnaire resource to centralize the Yes/No/Unknown options. Also normalize several answerCoding.display values from "Ja" to "ja" for consistency. Affects input/resources/Questionnaire-ACP-zib2020.json.
Handle SNOMED semantic tags and prefer parenthesis-free Dutch designations when building display labels. Add SNOMED_SYSTEM constant and a regex-based _clean_display to remove trailing semantic tags (e.g. "ja (kwalificatiewaarde)" -> "ja"). Update _dutch_display to prefer Dutch designations without parenthetical parts and to call _clean_display; propagate an optional system parameter through _dutch_display and _codesystem_display_map and update callers so CodeSystem lookups can apply SNOMED-specific cleaning. This yields cleaner answerOption/display values for SNOMED concepts.
… and responses

Includes fixed enableWhen behaviour
Revise input/resources/README.md to reorganize and clarify the questionnaire preparation steps. Replaces the old conditional-expression/FHIRPath instructions with a new Step 4 instructing replacement of answerOption arrays by answerValueSet references; removes the NLM Form Builder fix walkthrough and example JSON. Adds a Step 0 to run util/questionnaire_item_anwserOption_expander.py to expand answer options and a Step 5 to run util/questionnaire_item_prefix_populator.py to populate item prefixes; retains the code-removal script step (renumbered). Updates the export/replace and LHC Forms loading guidance to reference the expanded questionnaire and adjusts step numbering and registration notes for the IG.
Comment thread input/resources/Questionnaire-ACP-zib2020.json
Comment thread input/resources/Questionnaire-ACP-zib2020.json
"type": "string",
"enableWhen": [
{
"question": "1422",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this enableWhen rule strictly necessary, as 1422 has the code OTH as initial, read-only value?

Comment thread input/resources/Questionnaire-ACP-zib2020.json
MariekeMassa and others added 6 commits June 1, 2026 17:10
Changed in questionnaire and one QR, still needs to be done for remaining two QRs
The group level was added to the remaining two questionnaire responses for the question 'Gesprek gevoerd in bijzijn van'. Additionally, answer in QR for Samira was changed to SIS.

@MariekeMassa MariekeMassa left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All changes are discussed and approved.

@MariekeMassa MariekeMassa merged commit b96ab47 into develop Jun 2, 2026
1 check passed
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

Successfully merging this pull request may close these issues.

3 participants