Validate submissions in central server

Am running a continuous improvement project in around 3000 healthcare facilities. Once a facility is enrolled, we start by conducting a the baseline assessment and then conduct follow-up assessments after every 3 months.As the follow-up assessments continue to grow we have a situation where field data officers are mixing up the assessments.
For instance, in a facility where aassessments have been done upto follow-up 2, an officer is supposed to do a follow-up 3 assessment but they erroneously again do an assessment and indicate it to follow- up 2 hence we end up with duplicate follow- up 2s and missing a follow-up 3 from that facility.
Is there a way to include validation in the database that will notify the field officer submitting the data so that they can correct before it is submitted to the database?

1 Like

Welcome, @jeffbundi! When you have a moment we'd love to learn more about you and your project. Check out the introduction thread for others doing work similar to what you're doing, too.

First, I assume that the follow-up 2 and follow-up 3 assessments are different from each other, is that right? If not, perhaps you can edit the follow-up number from Central or maybe not even ask for a follow-up number but instead order follow-ups based on date.

There is no concept currently in ODK of the server doing validation at time of submission. That's because the system is designed to work well in disconnected environments where submissions may be sent significantly after data was collected. The ODK way to address the need that you have would be to try to prevent the error in the first place. In this case, it should be possible to do something like calculate the assessment number or have a constraint on it.

Do you know ahead of time what months the assessments will take place in? If so, you could use the date to validate the assessment number. If each facility is on a different schedule, you could include the target date/month in an attached data CSV.

If you don't know the schedule ahead of time and your assessors have fairly frequent internet access, you could use entities to help manage the workflow. The general idea would be to create an assessment entity each time an assessment is complete. Each assessment would include the facility that the assessment is for, the date, and the assessment number. Then you could use that information in your forms to show a summary of completed assessments and/or only show the assessment(s) that still need to be done.

If any of these techniques seem like they would be helpful to you, please let us know and we can provide worked examples.