Problem Statement
This project represented a significant challenge for me. As you may have noticed from my résumé and portfolio, my area of expertise is not in software development or interface programming. However, my supervisor at the hospital requested that I create a program using a fingerprint scanner to help manage the food consumption of the medical specialist students in the hospital cafeteria.
The main issues to address were:
- Reliable user registration: The system needed to track when students accessed the cafeteria for breakfast, lunch, or dinner. This would streamline the billing process and ensure that the outsourced cafeteria service was properly compensated.
- Tighter control over meal access: All medical specialist students have the right to breakfast and lunch, but dinner is restricted. Only students on night duty at the hospital are allowed to have dinner.
Solution Implementation
To tackle these challenges, I conducted research, studied the necessary concepts, and admittedly, watched a lot of YouTube videos to guide me through the process of developing the fingerprint scanner software using the DigitalPersona 4500 fingerprint reader.

After much effort, and despite not being familiar with C#, I managed to create the software with the invaluable help of online resources. Here are some key modules of the program:
- frmVerificar.cs: This module verifies each user’s fingerprint when they attempt to access the cafeteria. The image illustrates how I set the allowed time intervals for breakfast, lunch, and dinner. It also checks if a user has already consumed a meal within the specified time period, preventing double entries, as users are only allowed one breakfast, one lunch, and one dinner per day.

- captureForm.cs: This module handles the actual fingerprint capture process.

- frmRegistrar.cs: This module manages the user registration process. The image shows how the «Add» button functions after the user’s details and fingerprint have been captured. The second image shows the password prompt that appears before a user’s fingerprint can be registered.


- Main Menu: It contains two buttons, «Register» and «Verify.» The first initiates the registration process defined in frmRegistrar.cs, and the second begins the verification process in frmVerificar.cs, allowing registered users to validate their fingerprints and access the cafeteria.

- Registration Menu: Here, the new user details are entered.

- Password for Registration: Once the new user’s details have been entered, a password is required to finalize the fingerprint registration.

- Fingerprint Enrollment Menu: The system prompts the user to place their fingerprint four times to complete the registration.

- Add Record: Once the registration details are complete, the «Add» button finalizes the registration.

- Registration Table Preview: After adding a new user, the registration table in the database is displayed for verification.

- Deactivated User Verification Menu: If a user is deactivated, they will be unable to access the cafeteria, as shown in this menu.

- Activated User Verification Menu: If a user is active, they are granted access to the cafeteria. Upon successful fingerprint verification, the system sends a WhatsApp message using the Twilio service to notify cafeteria staff that the user is authorized to receive a meal.

- Correct User Verification: When a user is successfully verified, the system uses Twilio to send a WhatsApp message that includes the user’s name, confirming their verification. This is programmed in frmVerificar.cs.

Database Integration
I used SQL Server to build the database that is connected to the fingerprint scanner software. In this database, I implemented Scheduled Jobs, activation and deactivation scripts, and queries for generating food consumption reports. Here’s an overview of what was done in SQL Server:
- Entity-Relationship Diagram: The «Comedor» table stores user registration data, and the «Entrada_comedor» table logs the user ID, name, date, and time of each fingerprint verification.

- Activation/Deactivation Script: This script helps verify records and activate or deactivate users under specific circumstances.

- Report Generation Script: This query gathers data from the «Entrada_comedor» table and determines whether the user had breakfast, lunch, or dinner based on verification times using a CASE clause.

- Backup Script: This script performs a daily backup of the database.

- Task Scheduler: I used Windows Task Scheduler to automate the execution of specific scripts. Every week, I receive a list of students scheduled for night duty via Google Sheets. Based on this, I update the deactivation scripts, which run every day at 5 pm. These scripts ensure that only night-duty students have dinner access, while all others are denied.


- Activation Script: Every day at 5 am, this script activates all students, as all medical specialist students are entitled to breakfast and lunch.

Conclusion
The implementation of this system achieved several key objectives:
- Reliable and automated user registration for meal access in the hospital cafeteria, improving efficiency and reducing manual oversight.
- Accurate billing process by tracking meal consumption for breakfast, lunch, and dinner, ensuring proper compensation for the outsourced cafeteria service.
- Meal access control based on specific conditions, such as granting dinner only to students on night duty, thereby preventing unauthorized access.
- Seamless fingerprint verification integration, allowing students to quickly verify their identity and access meals without manual intervention.
- Real-time notifications via WhatsApp, ensuring the cafeteria staff are immediately informed when a user is authorized to receive a meal.
- Automated database management through SQL Server, with scheduled tasks for activating and deactivating users based on their duty schedules.
- Daily backups and report generation, ensuring data integrity and providing insights into meal consumption trends.
This system successfully integrates fingerprint technology, database automation, and communication tools, creating an efficient solution for managing the cafeteria’s operations and student access.