Evolution of value over time

Hello everyone,

In one of our form we ask a patient her weight. We'd like to store the
evolution of her weight over time. The number of time she'll have her
weight measured is not defined and may vary from patient to patient.

What is the best way to store the evolution of a field over time ?

Many thanks,

··· -- Charles Flèche mHealth advisor Télécoms Sans Frontières http://www.tsfi.org Première Urgence - Aide Médicale Internationale http://www.pu-ami.org +95 9 431 978 25 Skype: charles.fleche

Hi Charles,

Hello everyone,

In one of our form we ask a patient her weight. We'd like to store the
evolution of her weight over time. The number of time she'll have her
weight measured is not defined and may vary from patient to patient.

What is the best way to store the evolution of a field over time ?

If you just need this data for analysis you can get it from the "case
history" section of the case exports.

If you need it on the phone, you can only store a fixed number of data
points. So you would have to add previous_weight_1, previous_weight_2...
etc. as case properties and then use logic expressions in the form to
populate them "down the chain" in the case. (so weight -->
previous_weight_1, previous_weight_1 --> previous_weight_2, etc.).

Cory

··· On Tue, Jul 8, 2014 at 4:10 PM, Charles Flèche wrote:

Many thanks,

--
Charles Flèche
mHealth advisor
Télécoms Sans Frontières http://www.tsfi.org
Première Urgence - Aide Médicale Internationale http://www.pu-ami.org
+95 9 431 978 25
Skype: charles.fleche

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Cory, thanks for your quick answer.

··· On 08/07/2014 19:03, Cory Zue wrote: > points. So you would have to add previous_weight_1, previous_weight_2... > etc. as case properties and then use logic expressions in the form to > populate them "down the chain" in the case. (so weight --> > previous_weight_1, previous_weight_1 --> previous_weight_2, etc.).

Ah, that is unfortunate… However for our purpose a simple concatenated
string would be enough, there is no need for retrieving the values as a
list of integers. Something in the line of "50-51-56-59-", with a logic
like :

/anc/weight_history = concat(/anc/weight_history, /anc/weight, '-')

Can a value refers itself in a Calculate Condition ?

Many thanks,

--
Charles Flèche
mHealth advisor
Télécoms Sans Frontières http://www.tsfi.org
Première Urgence - Aide Médicale Internationale http://www.pu-ami.org
+95 9 431 978 25
Skype: charles.fleche

Charles,

A question cannot refer to itself, so you'd need a normalized node that
calculated

/anc/weight_history_normalized = concat(/anc/weight_history, /anc/weight,
'-')

The only alternative currently would be to open a subcase for each form
that recorded the weight observation.

-Clayton

··· On Wed, Jul 9, 2014 at 8:47 AM, Charles Flèche wrote:

Hi Cory, thanks for your quick answer.

On 08/07/2014 19:03, Cory Zue wrote:

points. So you would have to add previous_weight_1, previous_weight_2...
etc. as case properties and then use logic expressions in the form to
populate them "down the chain" in the case. (so weight -->
previous_weight_1, previous_weight_1 --> previous_weight_2, etc.).

Ah, that is unfortunate… However for our purpose a simple concatenated
string would be enough, there is no need for retrieving the values as a
list of integers. Something in the line of "50-51-56-59-", with a logic
like :

/anc/weight_history = concat(/anc/weight_history, /anc/weight, '-')

Can a value refers itself in a Calculate Condition ?

Many thanks,

--
Charles Flèche
mHealth advisor
Télécoms Sans Frontières http://www.tsfi.org
Première Urgence - Aide Médicale Internationale http://www.pu-ami.org
+95 9 431 978 25
Skype: charles.fleche

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Also please note that currently, in order for the 'Case History' feature
to show the list of of case properties, you need to click on 'Show Deleted
Questions and Advanced Options
' as well!

This wiki has been updated with this info:
https://confluence.dimagi.com/display/commcarepublic/Case+Data+Export

··· On Wednesday, July 9, 2014, Clayton Sims wrote:

Charles,

A question cannot refer to itself, so you'd need a normalized node that
calculated

/anc/weight_history_normalized = concat(/anc/weight_history, /anc/weight,
'-')

The only alternative currently would be to open a subcase for each form
that recorded the weight observation.

-Clayton

On Wed, Jul 9, 2014 at 8:47 AM, Charles Flèche mhealth-myanmar@tsfi.org wrote:

Hi Cory, thanks for your quick answer.

On 08/07/2014 19:03, Cory Zue wrote:

points. So you would have to add previous_weight_1, previous_weight_2...
etc. as case properties and then use logic expressions in the form to
populate them "down the chain" in the case. (so weight -->
previous_weight_1, previous_weight_1 --> previous_weight_2, etc.).

Ah, that is unfortunate… However for our purpose a simple concatenated
string would be enough, there is no need for retrieving the values as a
list of integers. Something in the line of "50-51-56-59-", with a logic
like :

/anc/weight_history = concat(/anc/weight_history, /anc/weight, '-')

Can a value refers itself in a Calculate Condition ?

Many thanks,

--
Charles Flèche
mHealth advisor
Télécoms Sans Frontières http://www.tsfi.org
Première Urgence - Aide Médicale Internationale http://www.pu-ami.org
+95 9 431 978 25
Skype: charles.fleche

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Continuing the discussion from Evolution of value over time:

Hi - This is precisely the feature I have been looking for. However, I have followed the above directions and cannot get a history button (option) to show up. Is this feature still supported? Realize this is an older thread.
Thx

If all you need is the historical values for an individual case, if you pull up the case through CommCareHQ's built in Case List report and click on the name of an individual case property you can now directly see the changes to that value over time, including who made them and with what form: