Displaying History of Changes

Overview

In the case list screen it is often useful to display the history of a tracked value like patient weight or blood pressure. This can be done by following the Incrementing a counter trick, but using a string concatenation instead of an increment:

  • "weight" is a number question in the form.

  • "weight_history" is a case property that tracks the history of weight values

  • "new_weight_history" is a hidden value that calculates the new weight history, including the current answer for "weight". This gets saved back to the case property "weight_history"

In the calculate condition for "new_weight_history", you use the concat function to add the answer to the weight question to the weight_history: concat(#case/weight_history, #form/weight, '-'). The final dash is a separator that ensures the weight history can be easily read.

Example

Icon

The output of this would be "55 - 56 - 58 - " and would continue to track the additions.