Versions Compared

Key

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

...

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:

  • previous"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 set by the caseweight_history Calculate Condition becomes something in the lines of concat(/anc/previous_weight_history, /anc" 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.

...

Image Added