Visibility logic inside a Finger-Ink form lets you ask follow-up questions — decide to show or hide individual fields on a screen, whole screens of fields or even entire sections comprised of multiple screens.
A few great use-cases for this are:
Asking for further detail only when a patient when a patient answers your "existing medical conditions" question with "Other".
Only asking for details as to how much someone smokes if they actually answer "yes" to the "Do you smoke or have you ever smoked?" question.
Asking for details of a guardian only when the patient is under a certain age.
Skipping the entire pregnancy section when your patient's gender isn't female.
Visibility logic can also be applied to signatures. This is great in cases where you only want to ask for the signature of a guardian if your patient is under 16.
How do I use visibility logic?
When you're editing a form, clicking into a section, screen, field or signature will change the sidebar on the right-hand side to reflect the part of the form that has focus. You can then use this sidebar to set visibility logic on that form element.
Here's a demonstration of using visibility logic to ask how many packs a day someone smokes — but only when they've indicated they smoke at all:
Most of the time, you're given three major options for visibility:
Only show when...
Only show on treatment note
1. Always show
This works as you'd expect. For example: settings a field to "Always show" will always show the field in cases where the screen and the section should also show (i.e. if they're also both "Always show", or if they have visibility logic that has been met).
3. Only show on treatment note
Selecting "Only show on treatment note" will hide the form element from the form completely — but will bring that element through to a draft treatment note, so that it can be filled when the draft treatment note is edited.
Using this option is the same as "hiding" a question in previous versions of Finger-Ink.
2. Only show when...
This is where you get to specify visibility logic that needs to be met in order for the form element to appear. There are three parts to this — a field, condition and value.
The field is the first thing you choose when specifying visibility logic. The value of this field during form filling is evaluated together with the condition and visibility value to determine whether or not the element should be shown during form filling.
In the smoking example above, the field "Smoke?" offered the options of "Yes" and "No" on a previous screen which asked "Do you smoke?". Note how the field is displayed as "4.1.1 - Smoke?":
The numbers come from the field's place in the tree. The "Smoke?" field is in the 4th section, on the 1st screen in this section, and is the 1st field on this screen. The "Smoke?" text comes from the fact that the prompt for the field is "Smoke?":
The condition is either "is" or "is not" for most fields.
Date fields (such as the date of birth field) also get "older than (in years)" and "younger than (in years)":
The value is the exact value that you'd like to evaluate.
In the smoking example above, if we were to specify that the "How many packs a day do you smoke?" question should display if the answer to "Smoke?" is "yes" instead of "Yes", then it would actually never show.
Why? Because the only two options are "Yes" and "No", there's no option for the all-lowercase "yes".
In this example though, we're actually prevented from entering "yes" entirely — as the form editor knows that the "Smoke?" field only has two possible options, and thus only gives us those two options to select from for the visibility logic value:
The work-around for multiple values
Right now, visibility logic is limited to a single value only. For example, let's assume your "Smoke?" field actually had three options:
And we wanted to display a follow-up question if the answer was "Yes" or "Sometimes". How can we do this? With multiple follow-up elements! We already have a follow-up screen that only shows if the value for the "Smoke?" field is "Yes":
Now we just need to duplicate this screen, and change the condition, easy: