We have a "patient consultation" form where the case informations are
displayed after selecting a patient. In this case summary we'd like to
show the number of time this "patient consultation" form has been filled
for a given patient.
What could be the best way to achieve that ?
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
The easiest way to implement this is with a single case property that gets
incremented by 1 each time the form is filled in. Let us know if you need
more guidance than that.
Cory
···
On Tue, Jul 8, 2014 at 4:13 PM, Charles Flèche wrote:
Hi everyone,
We have a "patient consultation" form where the case informations are
displayed after selecting a patient. In this case summary we'd like to show
the number of time this "patient consultation" form has been filled for a
given patient.
What could be the best way to achieve that ?
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
The easiest way to implement this is with a single case property that
gets incremented by 1 each time the form is filled in. Let us know if
you need more guidance than that.
Actually yes. Is there some doc in the wiki to implement such an
incrementation ?
Many thanks,
···
On 08/07/2014 19:10, Cory Zue wrote:
--
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
The easiest way to implement this is with a single case property that
gets incremented by 1 each time the form is filled in. Let us know if
you need more guidance than that.
Actually yes. Is there some doc in the wiki to implement such an
incrementation ?
So basically you would have a add a few hidden values to the form. One
could be last_form_count and the other could be next_form_count.
last_form_count would load a case property called "form_count".
next_form_count would have a calculate expression that was equal to
last_form_count + 1, and would update the "form_count" case property. The
end result will be that the case property gets incremented by one each
time. You may also have to add logic so that "last_form_count" gets a
proper default value of 0 the first time.
The easiest way to implement this is with a single case property that
gets incremented by 1 each time the form is filled in. Let us know if
you need more guidance than that.
Actually yes. Is there some doc in the wiki to implement such an
incrementation ?
So basically you would have a add a few hidden values to the form. One
could be last_form_count and the other could be next_form_count.
last_form_count would load a case property called "form_count".
next_form_count would have a calculate expression that was equal to
last_form_count + 1, and would update the "form_count" case property. The
end result will be that the case property gets incremented by one each
time. You may also have to add logic so that "last_form_count" gets a
proper default value of 0 the first time.
Am hoping others on this list who are more experienced app builders can
fill in the details if you need more than that. I'd also encourage you to
check out the common logic expressions wiki page: Common Logic and Calculations - CommCare Public - CommCare Public
Cory
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