Restrict submissions on a per-case basis

Greetings,

I am wondering if there is a function to restrict the number of daily
submissions of a given form on a per-case basis. In our program, a
community health worker should be seeing each of their assigned cases on a
daily basis and recording whether each case took their medication or not.
We are relying on the date stamp of submission to assess adherence for that
given day. Workers will be trained that this is the case, so that if they
attempt to “catch up” from a missed previous day, there is no way to do so
by submitting multiple forms, but ideally we would like to build out the
form so that each worker can only submit the form once per day per case. Is
there a way to do this?

Thank you
ER

Hi Elizabeth,

Can multiple community health workers submit forms related to the same
case? If not, you should be able to use two case variables to keep track of
today’s count of form submissions. The logic would work like this: each
time a mobile worker (the community health worker) submits a form, you
check the last_submission_date. If last_submission_date != today(), you can
reset submission_count to 1 and last_submission_date to today(). Otherwise,
you can increment submission_count. When submission_count exceeds the
number of allowed submissions, you can use form logic to inform the user of
this and disallow future submissions.

Here’s a brief introduction to “Case Management,” the framework that allows
you to track variables on a case by case
basis: https://confluence.dimagi.com/display/commcarepublic/Case+Management

Best,
Jessica

··· On Tuesday, November 15, 2016 at 3:12:21 PM UTC, Elizabeth Ragan wrote: > > Greetings, > > I am wondering if there is a function to restrict the number of daily > submissions of a given form on a per-case basis. In our program, a > community health worker should be seeing each of their assigned cases on a > daily basis and recording whether each case took their medication or not. > We are relying on the date stamp of submission to assess adherence for that > given day. Workers will be trained that this is the case, so that if they > attempt to "catch up" from a missed previous day, there is no way to do so > by submitting multiple forms, but ideally we would like to build out the > form so that each worker can only submit the form once per day per case. Is > there a way to do this? > > Thank you > ER >

Hi Jessica,

Thanks for the response. Can you please clarify what you mean by ‘case
variable’? Are you implying that ‘last_submission_date’ and
’submission_count’ are inherent “background” variables calculated by the
program? Or do I need to create these variables? If the latter, how should
I go about doing this?

We’re looking to go one step beyond just tracking number of submissions per
form per case per day, we actually want to prevent >1 submission per form
per case per day. For this reason, the second approach seems to meet our
needs more. We will be enabling case sharing, so it’s possible that more
than one CHW could access a case in a given day.
When you refer to ‘form logic,’ are you referring to the “Logic” options
for the overall form?

Thank you.

··· On Wednesday, November 16, 2016 at 5:57:45 AM UTC-5, Jessica Long wrote: > > Hi Elizabeth, > > Can multiple community health workers submit forms related to the same > case? If not, you should be able to use two case variables to keep track of > today's count of form submissions. The logic would work like this: each > time a mobile worker (the community health worker) submits a form, you > check the last_submission_date. If last_submission_date != today(), you can > reset submission_count to 1 and last_submission_date to today(). Otherwise, > you can increment submission_count. When submission_count exceeds the > number of allowed submissions, you can use form logic to inform the user of > this and disallow future submissions. > > Here's a brief introduction to "Case Management," the framework that > allows you to track variables on a case by case basis: > https://confluence.dimagi.com/display/commcarepublic/Case+Management > > Best, > Jessica > > On Tuesday, November 15, 2016 at 3:12:21 PM UTC, Elizabeth Ragan wrote: >> >> Greetings, >> >> I am wondering if there is a function to restrict the number of daily >> submissions of a given form on a per-case basis. In our program, a >> community health worker should be seeing each of their assigned cases on a >> daily basis and recording whether each case took their medication or not. >> We are relying on the date stamp of submission to assess adherence for that >> given day. Workers will be trained that this is the case, so that if they >> attempt to "catch up" from a missed previous day, there is no way to do so >> by submitting multiple forms, but ideally we would like to build out the >> form so that each worker can only submit the form once per day per case. Is >> there a way to do this? >> >> Thank you >> ER >> >