What to do before adding a computation in a mobile module
- Determine the score for each answer.
- Determine the calculation of the scores in Computations JavaScript screen.
- Determine how the score will be displayed. You can show the score to the client and professional, or you can hide it for the client and only show the professional. For the latter, you can use the 'Professional only' option of the text block (paragraph, info, highlighted, tip or quote).
Only therapist will see the text if slider is activated, not the client.
The therapist sees a score, based on the client's answers.
Add a computation (calculation):
- After logging into the CMS, choose to create or edit a mobile module
- Create or edit a question with radio buttons (only one choice), checkboxes (multiple choice) or a slider.
- Activate the slider 'Use in computation' in the multiple choice field of the radio button (top right).
- After the slider is activated, an extra fields appears in which you can enter:
- a unique name to identify the field.
- values for each answer.
The editor adds the values of the answers. - Click on "Done Editing". Next, you click on "Computation' in the menu.
- You can now create the computation.
To do this you use javascript.
The explanation of creating the computation in javascript can be found on the support page 'How to create a computation'.Editor defines the computation in the edit computation view. - In this case, if you click on 'defined computation', you will see the name of the computation. In this example it is 'computation:depression'. You should add the 'Defined Computation' later via the menu item 'Topic'.
Display the computation score for the professionals
- Navigate back to "Topic" where the field with the values was created.
- Insert a textblock. This can be a paragraph, info, highlighted, tip or quote.
- Optional: activate the 'Professional only' slider in edit mode, if you want to hide the score and accompanying text for the client.
- Add the name of the corresponding computation so that the score can be displayed. Write '${insert_name_of_defined_computation}' in order to display the score. See the screenshot below for an example:
- You can add information or advice about the score for the professionals if that is relevant (see screenshot above).
Be aware to turn on the 'only professionals' slider in case you want the score of a computation to be only visible for professionals and not for clients.