How was the form built? (If applicable)
XLSForm Excel file
What are you trying to achieve or report?
Exemple
Si un patient répond :
• Items 1 à 4 : Non, Non, Non, Non = 4 points
• Item 5 : Oui = 1 point
• Items 6 et 7 : Non, Non = 2 points
• Item 8 : « Jamais / rarement » = 1 point
Le score final est 4 + 1 + 2 + 1 = 8, soit une observance élevée
Attach relevant files (XLSForm, CSV, Screenshots, Logs)
QUESTIONNAIRE_SOUARE.xlsx (63.3 KB)
Hi @lcurtis thanks for sharing.
A couple of initial comments regarding your XLSForm:
-
Some field names appear duplicated, which will cause errors during validation. Each name must be unique.
-
There is a begin_group without a corresponding end_group, so the structure needs to be corrected.
-
Please also review the relevant constraint in line 27, as it currently contains a condition that cannot be met.
Now, regarding your question: since the possible values for items 1–4 come from a choice list where:
You can simply sum the four variables.
Create a calculate question, for example named CALC_MMAS1_4, and add the following expression:
${MMAS1}+${MMAS2}+${MMAS3}+${MMAS4}
This will give you the total score for items 1–4.
QUESTIONNAIRE_SOUARE.xlsx (64.5 KB)
This should help you move forward.