How to set a sample for a project and also define a time for enumerators to make submissions?

I need an xlsform file for registering for a clinic, so that it does not accept more than 50 registrations or questionnaires, and at the end of the questionnaire a message informing the registrant of his registration number and the time of his attendance based on the registration number

Welcome to the community, @shuhadaa! Did you mean you wish to have only 50 submissions for a project and then accept no more submissions once the sample of 50 submissions has reached the server?

Hello
Thank you for the reply
Can I share my XLSFORM file with you
I could not finish the work according to the required conditions
It is a questionnaire to reserve a turn at a specific clinic
It accepts only 40 registrations each day
Then according to the registration number of each patient, inform him of the success of the registration and his registration number and specify the time of his attendance so that from 1-10 they attend at nine o’clock
And from 11-20 they attend at ten in the morning - And from 21-30 they attend at 11 - And from 31-40 they attend at 12
How can I send these responses with the registration number and the time of attendance instead of the famous phrase at the end of the questionnaire (Your response has been received)
I also had conditions that I could not implement as there are only four clinics and each clinic has different working days from the other
So how do I add a restriction on choosing the clinic according to its working days
Thank you for the help and I can send the XLSFORM file

Saturday Orthopedics + Urology + General Surgery
Sunday General Surgery
Monday Orthopedics + Urology
Tuesday General Surgery + Ear Surgery
Wednesday Orthopedics + Urology
Thursday General Surgery + Ear Surgery
aKypiLeQtxPETn7RTtYGfa (14).xlsx (7.3 KB)

@shuhadaa, I see that you have two distinct requirements for your form:

  1. Accept only 40 samples of submissions per day
  2. Send a confirmation mail to the respondent

Did I get you correctly?

Thank you my friend for your response and interest
Yes
1- The first restriction is 40 patients per day
2- Restricting registration to clinics on days that are not available and these are the clinic working days:
Saturday Orthopedic Surgery + Urology + General Surgery
Sunday General Surgery
Monday Orthopedic Surgery + Urology
Tuesday General Surgery + Ear Surgery
Wednesday Orthopedic Surgery + Urology
Thursday General Surgery + Ear Surgery
3- The third restriction is informing the registrant of his attendance time, preferably in the form of a message at the end of the questionnaire and not by email according to the following distribution:
Registrants with registration numbers from 1 - 10 attend at 9 am
Registrants with registration numbers from 11 - 20 attend at 10 am
Registrants with registration numbers from 21 - 30 attend at 11 am
Registrants with registration numbers from 31 - 40 attend at 12 am
These restrictions and I do not want to send an email to the registrants only to inform them of the end of the questionnaire That:
You have successfully registered and your reservation number is … and your arrival time is at …
Thank you for your help. Best regards

Hi guys

I was waiting for a reply to my message

I have benefited from this forum while browsing some good answers and there is some progress but I still need help here is my latest xlsform file
aKypiLeQtxPETn7RTtYGfa (23).xlsx (7.1 KB)

I was able to add the registration ID, but when I set the condition for the question q1, for example, q2 q3 q4 q5 still appears, and I want to hide them. The most difficult restriction remains in hiding the name of the non-working clinic.

@shuhadaa, making a long response to your post assuming that my response would benefit our entire KoboToolbox community. My example shared below should address the following:

  • Define sample size for the project: Allows only 300 submissions for this project (not more than that). But you could make changes (as needed in the XLSForm) to customize your needs.

  • Define sub-sample for the project: Allows only 5 submissions per site (a variable used inside this example). The XLSForm has 5 sample sites so as a user, Site 1 can only submit 5 times. Same with the other sites. Meaning submissions ticked with Site 2, Site 3, Site 4, and Site 5, can only be submitted 5 times per site. But you could make changes (as needed in the XLSForm) to address these needs too.

  • Define a daily submission record to the server: Allows only 20 submissions per day (and no more than that). You could however make changes to that too by making changes to your XLSForm (as needed).

  • Define time to submit a submission to the server: Allows an enumerator to make submissions to the server only between a defined time frame i.e. from 9 AM to 5 PM (no before and after that). You should be able to learn more about this XLSForm design from our previous post.

  • Automatically filter the services: Automatically filter the services available for the day based on the weekdays when the registration was made.

  • Automatically provide appointment: Automatically provide appointment time based on the number of registrations made on that day. I have made a sample for that day but for best results, you could change the appointment to the next day.


Please note that this example uses the Dynamic Data Attachment Feature where you will need to link the project dynamically to itself by following this support article.

Please also note that this example works best if a submission is submitted to the server in an interval of 5 minutes as the Dynamic Data Attachment takes 5 minutes to sync the data between the form and the server.


Survey tab in your XLSForm:

Choices tab in your XLSForm:

Data entry screen as seen in Enketo:

This is how it is seen when you make a first submission.

Data entry screen as seen in Enketo:

You will automatically start getting an appointment time from your second submission.

Data entry screen as seen in Enketo:

You will start getting a warning once the submission quota for Site 1 has reached (it’s sub-sample defined in the XLSForm).

Data entry screen as seen in Enketo:

The warning goes off if you select another site (on the same day).

Data entry screen as seen in Enketo:

You will get a warning once the submission quota for that day has been reached (as defined in the XLSForm).

Data entry screen as seen in Enketo:

You will see this error message if you try to make registration beyond the registration time (as defined in the XLSForm).


Reference XLSForm:

Case Management (Limiting Submissions By Date & Conditions).xlsx (11.8 KB)

cc: @ambassadors

3 Likes

Thank you my friend, you have tired me out. You have made a great effort for me, and thank you. I have completed the project. I will see what I can add or modify based on your valuable advice. Thank you.

1 Like