Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This section explains the Computational Forms feature which can be used to calculate scores for specific attributes, based on a Patient’s answers and a computational formula for the attribute.

...

You can add Computations code and formula to a .JSON content similar to the ones below and use that to create Computational Forms to record PROMs. However, there are few things to keep in mind when creating these forms -

  • only parentheses, variables and basic arithmetic operations can be performed.

  • variables are the id of the fields as defined in the form’s schema, i.e. these are the names of the keys under “properties” in the JSON schema of the form.

  • variables are referenced, just by the id, regardless of their nesting in the schema. For example, a field defined under schema > properties > pain > properties > p1 is simply referenced in the computation’s symbolic function as p1

View file
nameKOOS.json
View file
nameHOOS.json
View file
nameDASS-21.json

Note: Please check the bottom of the .JSON content attached above to see the Computations code and formula for KOOS, DASS-21, and HOOS respectively.

Example: Computation Code for DASS-21 Form

...

In the above example (Line 2-8 , is the computational code for one the attribute: Depression),

  • "computations": { is the key that informs the system that there are computations to be done in this form.

  • "depression": indicates the attribute whose score will be calculated.

  • "display_name": "Depression" is the text that will be displayed to the patient on the app for this attribute.

  • "display_order": 1 indicates that the calculated score for the attribute ‘Depression’ will be displayed first among the three attributes on the score card. The Dashboard User can change the value from '1' here, to any other positive integer value to change the order in which the attributes are displayed on the score card in the Form Results in the dashboard. The order is displayed from left to right and top to bottom for more than three attributes as illustrated below:

Depression ("display_order": 1)

Anxiety ("display_order": 2)

Stress ("display_order": 3)

"display_order": 4

"display_order": 5

"display_order": 6

"display_order": 7

"display_order": 8

"display_order": 9

  • "type": "symbolic" indicates the calculated score will be displayed as an integer value ('-ve', ‘0.0’, '+ve') on the dashboard.

  • "function": "q3 + q5 + q10 + q13 + q16 + q17 + q21" is the Computational formula for the attribute ‘Depression’ based on which the score will be calculated.

  • "improvement": "decrease" is used to visualise the calculated score in ‘Green’ or ‘Red’ colour prefixed by an ‘Upward’ or ‘Downward’ arrow. This illustrates a relative comparison of the calculated score across form submissions.

    • In this case, if the calculated score decreases from the first form submission to the second, it will be shown in green with a downward green arrow () in the second form submission. The opposite scenario, i.e., if the calculated scores increase from the first form submission to the second, it will be shown in red with an upward red arrow () in the second form submission.

    • On the other hand, "improvement": "increase" can be used to achieve the opposite result. Here, if the calculated score decreases from the first form submission to the second, it will be shown in red with a downward red arrow () in the second form submission. The opposite scenario, i.e., if the calculated scores increase from the first form submission to the second, it will be shown in green with an upward green arrow () in the second form submission.

The same lines of code (2-7) can be repeated as shown in the picture above (repeated 3 times for the attributes - ‘Depression’, Anxiety' and ‘Stress) to calculate scores for various other attributes using the patient’s answers from the same form submission in ‘Form Results’. These scores can be viewed together on the dashboard under the ‘Scores’ card in 'Form Results’.

It is HIGHLY recommended to test the computations after uploading a form containing them in the Admin Dashboard and submitting example results using a test patient. Incorrect computations, for example, the function is invalid or the  type has a typo and others, will simply fail to compute transparently without affecting the submission of the form. This will in turn result in the scores missing on the Admin Dashboard for any of these form submissions.

Page Properties
hiddentrue

Related issues