Counting intake types and displaying on follow up form

I'm wondering how to display the number of intake forms we have for an
individual by type in their follow up form (each suicide attempt, ideation,
etc. over time gets its own intake form).

So, for example, when our case worker goes to visit someone for a follow up
visit, they would be able to see how many attempts the individual has made
(that are in our registry).

I see code for counting forms (coalesce(#case/visit_count, 0) + 1) but it
doesn't allow me to count by type.

Thanks!

Oh! Forgot to mention. Intake type is determined by a checkbox variable on
the intake form.

Hi Alexandra,

To accomplish this the easiest thing to do is to keep an explicit count for
each visit type by maintaining one hidden value calculation and variable
for each potential type.

For each hidden value you, you'd replace that calculation with something
like the following (which assumes there is a select question in the form
with the id type_of_intake

(coalesce(#case/visit_count_ideation, 0) +
if(selected(#form/type_of_intake, 'ideation'), 1, 0) )

-Clayton

ยทยทยท On Fri, Aug 4, 2017 at 4:03 PM, Alexandra Hinton wrote:

Oh! Forgot to mention. Intake type is determined by a checkbox variable on
the intake form.

--
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.