Question State (Editable, Readonly, Hidden) Based on Prior Values
This feature comes with the FHIR Questionnaire Runtime component and is available through options in the associated part editors.
It is applicable to input nodes, such as radiolists, checklists, dropdowns(*), and text input, and it allows you to control the display/edit status of a question in runtime based on values in the context or sub-context like prefetched data. Its behavior is apparent in runtime client modes, like FHIR applications where the client processes FHIR data, as well as in UI frameworks like the LogicNets Assessment Framework and LogicNets Starter App Portal framework. The feature is especially useful in medical advice interactions where the same question was answered earlier in the current interaction, or the same question was answered in a previous interaction and the data from that earlier interaction is still available.
You can control the question state while still holding the data object value in the context, and the system interprets any downstream logic as if the question had been answered. Controlling the question state allows you to do the following:
- Hide the question from the user.
- Show the question as display only, not allowing the user to change the value.
- Show the question as editable, with the answer prefilled.
The state can be conditional for other information in the context or prefetch items, such as a datetime stamp. This is very useful for medical scenarios where prior answers may be deemed current or not sufficiently recent to be considered valid; e.g. a blood pressure reading from a month ago may be a valid while a blood pressure reading from a year ago may not.
Note that the default question state is transient, meaning its behavior is not dictated by the presence of the data object value in context and it will both appear in runtime and be editable.
* dropdowns are not supported by FHIR questionnaire in general, so they can only use this feature with non-FHIR implementations.
Field Editor (Advanced Tab)
The configuration settings for question state are in a table on the Advanced tab of the form-part node.
Field Name | Description/Use | Type/Options | Optional/Mandatory | |
Hidden | Set to 1 for question to be hidden in runtime. The system stores the value from default value path in context. Set to 0 when the default value path in use. The default value is empty, meaning the feature is not required. |
1 | 0 or $(data object) Empty |
Optional | |
Display only | Set to 1 for question to be set to display only (not editable) in runtime. Value from default value path is stored in context. Otherwise set to 0 when default value path in use. Default value is empty (feature not required). |
1 | 0 or $(data object) Empty |
Optional | |
Default value path | Set to [(sub)context path].$(pdecl@path). This is a data definition made up of the container of the sub-context, and the system variable $(pdecl@path) that contains the path name. Default value is empty, meaning the feature is not required. |
Data Object | Optional | |
Condition/rule | Use the rule editor to build rules using the value or other data attributes, including:
|
Optional | Optional |
Writing Prefetch to Sub-context
In FHIR-based and other applications this process can be part of the application framework background processing. Talk to your LogicNets Representative about setting this up.
For LogicNets Assessment Framework applications, you can also use the set meta data part to populate specific values and date stamps. Download and inspect the example project to see this in action.
Example Project
See this article for details of an example project you can download to your LogicNets Designer.